/* kickSphere — October Halloween attraction. Mobile-first; desktop enhancements at 900px+. */
:root {
  --night: #070a1f;
  --ink: #0d1233;
  --gold: #f4c65a;
  --gold-hi: #fff1b8;
  --gold-deep: #b27a1c;
  --ember: #ff8a2b;
  --blood: #8e1b22;
  --text: #f6ecd6;
  --muted: #c9bfa6;
  --line: #06c755;
  --serif: "Shippori Mincho B1", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --display: "Cinzel", "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Hiragino Sans", "Noto Sans JP", "Yu Gothic", sans-serif;
  --gold-grad: linear-gradient(180deg, #fff6cf 0%, #ffd873 38%, #e3a133 62%, #fff0b0 100%);
  --header: 56px;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--night); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  background: var(--night);
  overscroll-behavior-y: none;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p, ol { margin: 0; padding: 0; }
ol { list-style: none; }
button { font: inherit; color: inherit; }
.sp { display: inline; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: calc(var(--header) + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) 16px 0;
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(180deg, rgba(4, 6, 20, .85), rgba(4, 6, 20, 0));
  pointer-events: none;
}
.site-header > * { pointer-events: auto; }
.logo {
  font-family: var(--display); font-weight: 800; font-size: 20px; letter-spacing: .02em;
  text-decoration: none; color: #fff;
  text-shadow: 0 0 12px rgba(244, 198, 90, .5);
}
.logo span { background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.header-links { display: flex; gap: 8px; }
.pill {
  display: inline-flex; align-items: center; height: 32px; padding: 0 14px;
  border-radius: 99px; font-size: 12px; font-weight: 700; text-decoration: none;
  border: 1px solid rgba(255, 255, 255, .25); background: rgba(10, 12, 30, .55);
  cursor: pointer;
}
.pill-line { background: var(--line); border-color: transparent; color: #fff; }

/* ---------- Scene rail ---------- */
.rail {
  position: fixed; z-index: 45; right: 4px; top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 10px;
  transition: opacity .4s;
}
.rail button { background: none; border: 0; padding: 4px; cursor: pointer; display: flex; align-items: center; gap: 8px; flex-direction: row-reverse; }
.rail i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, .3); transition: transform .3s, background .3s; }
.rail span { display: none; font-size: 11px; letter-spacing: .1em; color: var(--muted); }
.rail button.is-active i { background: var(--gold); transform: scale(1.5); box-shadow: 0 0 10px var(--gold); }
body.is-final .rail { opacity: 0; pointer-events: none; }

/* ---------- World & scenes ---------- */
.track { position: relative; z-index: 1; pointer-events: none; }
.step { height: calc(var(--len) * 1vh); }

.world { position: fixed; inset: 0; z-index: 2; overflow: hidden; background: #000; }
.scene { position: absolute; inset: 0; overflow: hidden; visibility: hidden; opacity: 0; }
.scene.is-on { visibility: visible; opacity: 1; }
.cam { position: absolute; inset: 0; transform-origin: 50% 55%; }
.bg-wrap { position: absolute; inset: -4%; }
.bg-wrap picture { display: contents; }
.bg { width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; transform-origin: 50% 55%; will-change: transform; background: var(--ink); }

.vignette {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(120% 80% at 50% 45%, transparent 40%, rgba(3, 4, 16, .75) 100%),
    linear-gradient(180deg, rgba(3, 4, 16, .55) 0%, transparent 22%, transparent 60%, rgba(3, 4, 16, .85) 100%);
}

.copy {
  position: absolute; inset: 0; z-index: 5;
  padding: calc(var(--header) + env(safe-area-inset-top) + 8px) 20px calc(24px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; align-items: center; text-align: center;
  pointer-events: none;
}
.copy a, .copy button { pointer-events: auto; }

/* ---------- Type ---------- */
.eyebrow { font-family: var(--display); font-weight: 600; font-size: 11px; letter-spacing: .32em; color: var(--gold); text-shadow: 0 0 10px rgba(0, 0, 0, .8); }
.title-jp {
  font-family: var(--serif); font-weight: 800; font-size: clamp(26px, 7.4vw, 56px); line-height: 1.3; letter-spacing: .04em;
  margin-top: 8px; text-shadow: 0 2px 0 #3b2208, 0 4px 20px rgba(0, 0, 0, .8);
}
.gold, .title-jp .gold { background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .8)); }
.scene-lead { margin-top: 6px; color: var(--muted); font-size: 13px; text-shadow: 0 1px 8px #000; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 0 28px; border-radius: 99px; text-decoration: none; cursor: pointer;
  font-family: var(--serif); font-weight: 800; font-size: 17px; letter-spacing: .06em;
  transition: transform .2s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn b { font-size: 22px; line-height: 1; }
.btn:active { transform: scale(.97); }
.btn-gold {
  color: #3a1f02;
  background: linear-gradient(180deg, #fff2b5 0%, #f9cf5c 45%, #d99a2b 100%);
  box-shadow: 0 0 0 2px #7a4b0c, 0 0 0 4px rgba(255, 219, 120, .6), 0 10px 30px rgba(255, 170, 40, .45);
}
.btn-line { color: #fff; background: linear-gradient(180deg, #25d86f, #05a847); box-shadow: 0 0 0 2px rgba(255, 255, 255, .25), 0 10px 26px rgba(6, 199, 85, .35); }
.btn-x { color: #fff; background: #0b0b0f; box-shadow: 0 0 0 1px rgba(255, 255, 255, .45), 0 10px 26px rgba(0, 0, 0, .5); }
.btn-ghost { color: var(--gold-hi); border: 1px solid rgba(244, 198, 90, .7); background: rgba(10, 8, 20, .55); min-height: 46px; font-size: 15px; }
@media (hover: hover) { .btn:hover { transform: translateY(-2px); } }

/* ---------- Atmosphere layers ---------- */
.fog { position: absolute; left: -50%; width: 200%; pointer-events: none; will-change: transform; }
/* Elements that already run a CSS keyframe transform are moved by scroll through
   the individual translate/scale properties (driven by CSS variables from GSAP). */
.fog, .hang { translate: var(--tx, 0px) var(--ty, 0px); scale: var(--s, 1); }
.fog::before, .fog::after { content: ""; position: absolute; inset: 0; }
.fog-back {
  bottom: 12%; height: 40%; opacity: .55;
  background:
    radial-gradient(28% 40% at 12% 60%, rgba(170, 190, 255, .35), transparent 70%),
    radial-gradient(30% 45% at 40% 50%, rgba(170, 190, 255, .28), transparent 70%),
    radial-gradient(26% 38% at 66% 62%, rgba(170, 190, 255, .32), transparent 70%),
    radial-gradient(30% 45% at 90% 52%, rgba(170, 190, 255, .28), transparent 70%);
  animation: drift 38s linear infinite;
}
.fog-front {
  bottom: -8%; height: 34%; opacity: .7;
  background:
    radial-gradient(30% 60% at 20% 70%, rgba(200, 210, 255, .35), transparent 70%),
    radial-gradient(34% 55% at 55% 65%, rgba(200, 210, 255, .3), transparent 70%),
    radial-gradient(30% 60% at 85% 72%, rgba(200, 210, 255, .35), transparent 70%);
  animation: drift 22s linear infinite reverse;
}
@keyframes drift { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(-25%, 0, 0); } }

.bats { position: absolute; inset: 0; pointer-events: none; }
.bat-fly { position: absolute; left: 0; top: 0; color: #05060f; will-change: transform; animation: fly var(--dur, 14s) linear var(--delay, 0s) infinite; }
.bat-fly svg { width: var(--size, 38px); height: auto; animation: flap .28s ease-in-out infinite alternate; filter: drop-shadow(0 0 2px rgba(255, 200, 120, .25)); }
@keyframes flap { from { transform: scaleY(1); } to { transform: scaleY(.35); } }
@keyframes fly {
  0% { transform: translate3d(var(--x0), var(--y0), 0); }
  50% { transform: translate3d(calc((var(--x0) + var(--x1)) / 2), var(--ym), 0); }
  100% { transform: translate3d(var(--x1), var(--y1), 0); }
}

.particles { position: fixed; inset: 0; z-index: 4; width: 100%; height: 100%; pointer-events: none; }
.world .copy { z-index: 6; }

/* ---------- 1. HERO ---------- */
.moon-glow {
  position: absolute; left: 50%; top: 18%; width: 90vmin; height: 90vmin; margin: -45vmin 0 0 -45vmin;
  background: radial-gradient(circle, rgba(255, 214, 130, .45) 0%, rgba(255, 190, 90, .12) 35%, transparent 65%);
  animation: breathe 6s ease-in-out infinite; pointer-events: none;
}
@keyframes breathe { 50% { opacity: .6; transform: scale(1.06); } }
.hero-niki { position: absolute; left: -4%; bottom: 3%; width: 50vw; max-width: 460px; transform-origin: 50% 100%; filter: drop-shadow(0 10px 20px rgba(0, 0, 0, .6)); }
.hero-chest { position: absolute; right: -2%; bottom: 5%; width: 46vw; max-width: 460px; transform-origin: 50% 100%; }
.hero-chest img { position: relative; filter: drop-shadow(0 12px 18px rgba(0, 0, 0, .7)); animation: bob 4s ease-in-out infinite; }
.chest-halo { position: absolute; left: 50%; top: 50%; width: 180%; aspect-ratio: 1; translate: -50% -50%; background: radial-gradient(circle, rgba(255, 205, 100, .55), rgba(255, 170, 60, .15) 40%, transparent 68%); animation: breathe 3.2s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-6px); } }

.hero-copy { justify-content: flex-start; padding-top: calc(var(--header) + env(safe-area-inset-top) + 4vh); }
.kicker { font-family: var(--serif); font-weight: 800; font-size: 16px; letter-spacing: .12em; text-shadow: 0 2px 10px #000; }
.kicker span { font-family: var(--display); color: var(--gold); margin-right: 6px; }
.hero-title { margin-top: 6px; line-height: .92; filter: drop-shadow(0 4px 0 #4a2a06) drop-shadow(0 10px 24px rgba(0, 0, 0, .8)); }
.hero-title .en { display: block; font-family: var(--display); font-weight: 800; font-size: clamp(44px, 14.5vw, 128px); letter-spacing: .02em; background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-title .en-2 { font-size: clamp(34px, 11vw, 96px); letter-spacing: .24em; margin-right: -.24em; }
.hero-lead { margin-top: 14px; font-family: var(--serif); font-weight: 700; font-size: clamp(17px, 4.8vw, 28px); line-height: 1.6; text-shadow: 0 2px 12px #000, 0 0 2px #000; }
.hero-sub { margin-top: 8px; font-size: 12px; color: var(--muted); max-width: 22em; text-shadow: 0 1px 8px #000; }
.hero-copy .btn { margin-top: 18px; }
.scroll-hint { position: absolute; z-index: 6; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; font-family: var(--display); font-size: 10px; letter-spacing: .3em; color: var(--gold-hi); text-shadow: 0 0 8px #000; }
.scroll-hint i { width: 1px; height: 40px; background: linear-gradient(var(--gold), transparent); animation: hint 1.8s ease-in-out infinite; transform-origin: top; }
@keyframes hint { 0% { transform: scaleY(0); } 60% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }

/* ---------- 2. FOREST ---------- */
.tree { position: absolute; bottom: -6%; height: 105%; width: auto; max-width: none; transform-origin: 50% 100%; will-change: transform, opacity; opacity: 0; }
.tree.flip { scale: -1 1; }
.tree-a-l, .tree-b-l { left: 50%; margin-left: -60vh; }
.tree-a-r, .tree-b-r { right: 50%; margin-right: -60vh; }
.lanterns { position: absolute; inset: 0; pointer-events: none; }
.lantern { position: absolute; top: 0; width: 13vw; max-width: 90px; display: flex; flex-direction: column; align-items: center; transform-origin: 50% 0; animation: sway 5s ease-in-out infinite; }
.lantern .cord { display: block; width: 2px; height: var(--cord, 90px); background: linear-gradient(#000, #3b2a14); }
.lantern img { position: relative; z-index: 1; opacity: .35; transition: opacity .6s; }
.lantern .glow { position: absolute; z-index: 0; left: 50%; bottom: -30%; width: 340%; aspect-ratio: 1; transform: translateX(-50%); background: radial-gradient(circle, rgba(255, 190, 90, .55), rgba(255, 150, 50, .15) 40%, transparent 68%); opacity: 0; transition: opacity .8s; }
.lantern.is-lit img { opacity: 1; }
.lantern.is-lit .glow { opacity: 1; }
.l1 { left: 6%; --cord: 70px; animation-delay: -1s; }
.l2 { right: 8%; --cord: 120px; animation-delay: -2.4s; width: 11vw; }
.l3 { left: 22%; --cord: 40px; width: 9vw; animation-delay: -3.6s; }
@keyframes sway { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }

.forest-copy { justify-content: center; gap: 18px; }
.weekly { display: grid; gap: 12px; width: 100%; max-width: 440px; }
.card {
  display: grid; grid-template-columns: 76px 1fr; gap: 14px; align-items: center; text-align: left;
  padding: 14px 16px; border-radius: 14px;
  background: linear-gradient(180deg, rgba(28, 20, 44, .88), rgba(10, 8, 22, .92));
  border: 1px solid rgba(244, 198, 90, .55);
  box-shadow: inset 0 0 0 3px rgba(0, 0, 0, .35), inset 0 0 0 4px rgba(244, 198, 90, .18), 0 12px 30px rgba(0, 0, 0, .55), 0 0 30px rgba(255, 170, 60, .12);
}
.card .tag { display: inline-block; padding: 1px 10px; border-radius: 4px; font-size: 11px; font-weight: 700; color: #2d1802; background: var(--gold-grad); }
.card h3 { margin-top: 4px; font-family: var(--serif); font-weight: 800; font-size: 18px; line-height: 1.35; color: var(--gold-hi); }
.card p:not(.tag) { margin-top: 2px; font-size: 12px; color: var(--muted); line-height: 1.5; }
.emblem { width: 76px; height: 76px; border-radius: 12px; display: grid; place-items: center; font-family: var(--display); font-weight: 800; color: #3a1f02; background: var(--gold-grad); box-shadow: 0 0 20px rgba(255, 190, 80, .35); position: relative; }
.emblem-fri { font-size: 26px; line-height: 1; align-content: center; gap: 2px; background: linear-gradient(#b3222b 0 34%, #fff4dc 34%); color: #1d1106; }
.emblem-fri small { font-family: var(--serif); font-size: 11px; color: #fff; margin-bottom: 8px; }
.emblem-dice { grid-auto-flow: column; gap: 4px; background: none; box-shadow: none; }
.emblem-dice span { width: 34px; height: 44px; border-radius: 6px; display: grid; place-items: center; font-size: 28px; background: #fff4dc; color: #b3222b; box-shadow: 0 3px 0 #b88a3a, 0 0 16px rgba(255, 200, 100, .5); }
.emblem-dice span:last-child { transform: rotate(8deg); }
.emblem-seal { border-radius: 50%; background: radial-gradient(circle at 40% 35%, #d8454c, #7c1016); color: var(--gold-hi); font-size: 26px; align-content: center; line-height: 1; }
.emblem-seal small { font-size: 11px; letter-spacing: .15em; }

/* ---------- 3. TOWN ---------- */
.window-glow { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(40% 50% at 18% 55%, rgba(255, 170, 60, .28), transparent 70%), radial-gradient(40% 50% at 82% 55%, rgba(255, 170, 60, .28), transparent 70%); animation: flicker 3.4s steps(6) infinite; }
@keyframes flicker { 0%, 100% { opacity: .9; } 20% { opacity: .7; } 40% { opacity: 1; } 60% { opacity: .78; } 80% { opacity: .95; } }
.hang { position: absolute; top: 0; display: flex; flex-direction: column; align-items: center; transform-origin: 50% 0; animation: sway 4.2s ease-in-out infinite; }
.hang .cord { display: block; width: 2px; height: var(--cord, 60px); background: #1a120a; }
.hang-sign { right: 7%; --cord: 64px; animation-duration: 5.2s; }
.sign { display: grid; justify-items: center; padding: 8px 12px 10px; border-radius: 6px; background: linear-gradient(#3c2a18, #1f150c); border: 2px solid #a37a37; box-shadow: 0 8px 20px rgba(0, 0, 0, .6); font-family: var(--display); color: var(--gold-hi); }
.sign b { font-size: 30px; line-height: 1; }
.sign span { font-size: 9px; letter-spacing: .18em; line-height: 1.3; }
.hang-p1 { left: 8%; --cord: 30px; width: 15vw; max-width: 110px; animation-delay: -1.3s; }
.hang-p2 { left: 32%; --cord: 90px; width: 10vw; max-width: 80px; animation-delay: -2.2s; }
.prop { position: absolute; bottom: 4%; width: 30vw; max-width: 260px; opacity: 0; transform-origin: 50% 100%; will-change: transform, opacity; }
.prop-a-l, .prop-b-l { left: 34%; }
.prop-a-r, .prop-b-r { right: 34%; }

.town-copy { justify-content: flex-end; gap: 14px; }
.town-copy .scene-head { margin-bottom: auto; margin-top: 2vh; }
.calendar {
  position: relative; width: 100%; max-width: 460px; padding: 16px 16px 16px 14px; border-radius: 16px; text-align: left;
  background: linear-gradient(180deg, rgba(20, 14, 34, .86), rgba(8, 6, 18, .92));
  border: 1px solid rgba(244, 198, 90, .5);
  box-shadow: inset 0 0 0 4px rgba(244, 198, 90, .1), 0 20px 40px rgba(0, 0, 0, .6);
}
.cal-line { position: absolute; left: 26px; top: 26px; bottom: 26px; width: 2px; background: rgba(244, 198, 90, .2); }
.cal-line b { position: absolute; inset: 0; background: linear-gradient(var(--gold-hi), var(--gold)); transform-origin: top; transform: scaleY(0); box-shadow: 0 0 10px var(--gold); }
.calendar li { position: relative; display: grid; grid-template-columns: 84px 1fr; gap: 8px; align-items: center; padding: 7px 0 7px 26px; opacity: .28; transition: opacity .4s; }
.calendar li::before { content: ""; position: absolute; left: 7px; top: 50%; width: 10px; height: 10px; margin-top: -5px; border-radius: 50%; background: #2a1f10; border: 2px solid rgba(244, 198, 90, .6); transition: background .3s, box-shadow .3s; }
.calendar li.is-past { opacity: .75; }
.calendar li.is-past::before, .calendar li.is-now::before { background: var(--gold); }
.calendar li.is-now { opacity: 1; }
.calendar li.is-now::before { box-shadow: 0 0 0 5px rgba(244, 198, 90, .25), 0 0 16px var(--gold); }
.calendar time { font-family: var(--display); font-weight: 800; font-size: 22px; color: var(--gold-hi); line-height: 1; white-space: nowrap; }
.calendar time small { font-family: var(--serif); font-size: 11px; color: var(--muted); margin-left: 3px; }
.calendar time.weekly-t { font-family: var(--serif); font-size: 15px; }
.calendar h3 { font-family: var(--serif); font-weight: 800; font-size: 15px; line-height: 1.3; }
.calendar p { font-size: 11px; color: var(--muted); }
.calendar em { font-style: normal; display: inline-block; padding: 0 8px; border-radius: 4px; background: #b3222b; color: #fff; font-weight: 700; }
.calendar li.hot time { color: #ffb45a; text-shadow: 0 0 12px rgba(255, 140, 40, .7); }

/* ---------- 4. GATE ---------- */
.gate-copy { justify-content: flex-start; }
.keydates { position: relative; flex: 1; width: 100%; }
.keydate { position: absolute; left: 50%; top: 42%; width: min(92vw, 520px); transform: translate(-50%, -50%); opacity: 0; }
.kd-date { font-family: var(--display); font-weight: 800; font-size: clamp(76px, 26vw, 180px); line-height: 1; background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 4px 0 #4a2a06) drop-shadow(0 0 30px rgba(255, 170, 60, .5)); }
.keydate h3 { margin-top: 6px; font-family: var(--serif); font-weight: 800; font-size: clamp(20px, 5.6vw, 34px); text-shadow: 0 2px 12px #000; }
.kd-sub { margin-top: 6px; font-size: 13px; color: var(--muted); text-shadow: 0 1px 8px #000; }
.kd-count { display: inline-block; margin-top: 14px; padding: 4px 16px; border-radius: 99px; border: 1px solid rgba(244, 198, 90, .6); background: rgba(8, 6, 18, .7); font-family: var(--serif); font-weight: 700; font-size: 14px; color: var(--gold-hi); }
.kd-count:empty { display: none; }
.gate-open { position: absolute; left: 0; right: 0; top: 40%; padding: 0 20px; transform: translateY(-50%); opacity: 0; }
.gate-open .title-jp { color: #2a1502; text-shadow: 0 0 20px rgba(255, 240, 200, .9); }
.gate-open .eyebrow { color: #7a4b0c; text-shadow: none; }

.doors { position: absolute; inset: 0; perspective: 1400px; opacity: 0; transform-origin: 50% 55%; pointer-events: none; }
.door-light { position: absolute; inset: 0; background: radial-gradient(60% 60% at 50% 50%, #fff9e0 0%, #ffd77a 35%, #d88a22 75%, #6a3108 100%); }
.door { position: absolute; top: 0; bottom: 0; width: 50.5%; will-change: transform; backface-visibility: hidden;
  background:
    repeating-linear-gradient(90deg, transparent 0 22%, rgba(0, 0, 0, .35) 22% 23%),
    linear-gradient(180deg, #2b1c11, #150d07 60%, #0c0704);
  box-shadow: inset 0 0 0 10px #1b120a, inset 0 0 0 14px #a37a37, inset 0 0 60px rgba(0, 0, 0, .8);
}
.door i { position: absolute; top: 46%; width: 34px; height: 34px; border-radius: 50%; border: 5px solid #d1a24b; box-shadow: 0 0 10px rgba(255, 190, 80, .5); }
.door-l { left: 0; transform-origin: 0 50%; }
.door-l i { right: 18px; }
.door-r { right: 0; transform-origin: 100% 50%; }
.door-r i { left: 18px; }
.door-l::after, .door-r::after { content: ""; position: absolute; top: 0; bottom: 0; width: 3px; background: #ffe6a0; box-shadow: 0 0 20px 6px rgba(255, 210, 120, .8); opacity: var(--seam, 0); }
.door-l::after { right: 0; }
.door-r::after { left: 0; }

/* ---------- 5. HALL ---------- */
.candles i { position: absolute; width: 22vmin; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(255, 200, 110, .5), transparent 65%); animation: flicker 2.6s steps(5) infinite; pointer-events: none; }
.candles i:nth-child(1) { left: 2%; top: 44%; }
.candles i:nth-child(2) { left: 14%; top: 60%; animation-delay: -.6s; }
.candles i:nth-child(3) { right: 2%; top: 46%; animation-delay: -1.2s; }
.candles i:nth-child(4) { right: 14%; top: 62%; animation-delay: -.3s; }
.candles i:nth-child(5) { left: 30%; top: 30%; width: 14vmin; animation-delay: -1.8s; }
.candles i:nth-child(6) { right: 30%; top: 30%; width: 14vmin; animation-delay: -2.1s; }
.candles i:nth-child(7) { left: 8%; top: 80%; animation-delay: -.9s; }
.candles i:nth-child(8) { right: 8%; top: 80%; animation-delay: -1.5s; }
.pillar { position: absolute; top: -10%; bottom: -10%; width: 26vw; will-change: transform; pointer-events: none;
  background:
    linear-gradient(180deg, #a37a37 0 3%, #2a1a10 3% 5%, transparent 5% 95%, #2a1a10 95% 97%, #a37a37 97%),
    repeating-linear-gradient(90deg, #120b10 0 12%, #1d1418 12% 22%, #0b070a 22% 30%),
    #120b10;
  box-shadow: inset -20px 0 40px rgba(255, 170, 60, .15), 0 0 60px rgba(0, 0, 0, .9);
}
.pillar-l { left: -8vw; }
.pillar-r { right: -8vw; box-shadow: inset 20px 0 40px rgba(255, 170, 60, .15), 0 0 60px rgba(0, 0, 0, .9); }

.hall-copy { justify-content: center; gap: 10px; }
.hall-title { font-family: var(--serif); font-weight: 800; font-size: clamp(18px, 5vw, 30px); line-height: 1.4; padding: 6px 18px; border-top: 1px solid rgba(244, 198, 90, .6); border-bottom: 1px solid rgba(244, 198, 90, .6); background: linear-gradient(90deg, transparent, rgba(80, 10, 16, .75), transparent); text-shadow: 0 2px 10px #000; }
.hall-title span { color: var(--gold); }
.pt-block { margin-top: 4px; }
.pt-lead { font-family: var(--serif); font-weight: 800; font-size: clamp(18px, 5vw, 30px); text-shadow: 0 2px 10px #000; }
.pt-num { font-family: var(--display); font-weight: 800; line-height: .95; font-size: clamp(96px, 32vw, 220px); background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 5px 0 #4a2a06) drop-shadow(0 0 40px rgba(255, 170, 60, .55)); font-variant-numeric: tabular-nums; }
.pt-num small { font-size: .4em; margin-left: .05em; }
.prize { font-family: var(--serif); font-weight: 700; font-size: 16px; text-shadow: 0 2px 10px #000; }
.prize strong { display: block; font-size: clamp(28px, 8vw, 52px); line-height: 1.2; background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .9)); }
.howto { display: flex; gap: 8px; margin-top: 6px; width: 100%; max-width: 440px; }
.howto li { flex: 1; display: flex; align-items: center; gap: 8px; padding: 10px; border-radius: 10px; font-size: 12px; font-weight: 700; text-align: left; line-height: 1.35; background: rgba(12, 8, 20, .8); border: 1px solid rgba(244, 198, 90, .4); }
.howto b { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-family: var(--display); color: #3a1f02; background: var(--gold-grad); }
.hashtag { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 6px; }
.tag-copy { display: grid; justify-items: center; min-height: 54px; padding: 6px 22px; border-radius: 99px; cursor: pointer; border: 2px solid var(--gold); background: rgba(40, 20, 6, .8); box-shadow: 0 0 20px rgba(255, 190, 80, .35); }
.tag-copy span { font-family: var(--serif); font-weight: 800; font-size: 18px; color: var(--gold-hi); line-height: 1.3; }
.tag-copy small { font-size: 10px; color: var(--muted); }
.fine { font-size: 11px; color: var(--muted); text-shadow: 0 1px 6px #000; }

/* ---------- 6/7. THRONE + FINAL ---------- */
.rays { position: absolute; left: 50%; top: 62%; width: 170vmax; aspect-ratio: 1; margin: -85vmax 0 0 -85vmax; opacity: 0; pointer-events: none;
  background: repeating-conic-gradient(from 0deg, rgba(255, 220, 140, .22) 0deg 6deg, transparent 6deg 18deg);
  -webkit-mask: radial-gradient(circle, #000 0%, transparent 55%); mask: radial-gradient(circle, #000 0%, transparent 55%);
  animation: spin 60s linear infinite; }
@keyframes spin { to { transform: rotate(1turn); } }
.throne-chest { position: absolute; left: 50%; top: 62%; width: 62vw; max-width: 440px; transform: translate(-50%, -50%); }
.throne-chest img { position: relative; filter: drop-shadow(0 16px 20px rgba(0, 0, 0, .8)); }
.throne-chest .chest-halo { opacity: .3; animation: none; }
.chest-flare { position: absolute; left: 50%; top: 42%; width: 120%; height: 30%; translate: -50% -50%; transform: scaleX(.2); opacity: 0; background: radial-gradient(50% 50% at 50% 50%, #fff8d8, rgba(255, 200, 90, .6) 35%, transparent 70%); }
.throne-chest.is-shaking img { animation: shake .5s ease-in-out infinite; }
@keyframes shake { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-1.5deg) translateY(-2px); } 75% { transform: rotate(1.5deg) translateY(-2px); } }
.final-dim { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(3, 3, 10, .75), transparent 35%, transparent 70%, rgba(3, 3, 10, .9)); opacity: 0; }

.throne-copy { justify-content: flex-start; }
.surprise, .mystery, .final { position: absolute; left: 0; right: 0; padding: 0 20px; }
.surprise { top: calc(var(--header) + env(safe-area-inset-top) + 3vh); }
.mystery { top: calc(var(--header) + env(safe-area-inset-top) + 2vh); opacity: 0; }
.mystery .q { font-family: var(--display); font-weight: 800; font-size: clamp(64px, 22vw, 150px); line-height: 1; letter-spacing: .1em; background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 30px rgba(255, 190, 80, .7)); }
.oct31 { font-family: var(--display); font-weight: 800; font-size: clamp(22px, 6.4vw, 44px); letter-spacing: .28em; color: var(--gold-hi); text-shadow: 0 0 16px rgba(255, 180, 60, .8), 0 2px 8px #000; }
.countdown { margin-top: 8px; font-family: var(--serif); font-weight: 700; font-size: 14px; color: var(--text); text-shadow: 0 1px 8px #000; font-variant-numeric: tabular-nums; }
.final { top: 0; bottom: 0; display: flex; flex-direction: column; justify-content: space-between; padding-top: calc(var(--header) + env(safe-area-inset-top) + 2vh); padding-bottom: calc(18px + env(safe-area-inset-bottom)); opacity: 0; visibility: hidden; }
.enter { font-family: var(--display); font-weight: 800; font-size: clamp(40px, 12vw, 96px); line-height: 1; background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 4px 0 #4a2a06) drop-shadow(0 0 24px rgba(255, 170, 60, .5)); }
.enter small { display: block; font-size: .32em; letter-spacing: .6em; margin-right: -.6em; margin-bottom: 6px; }
.ctas { display: grid; gap: 10px; width: 100%; max-width: 420px; margin: 0 auto; }
.ctas .btn { width: 100%; }
.footer-note { margin-top: 12px; font-size: 10px; color: var(--muted); }

.toast { position: fixed; z-index: 60; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); padding: 10px 18px; border-radius: 99px; background: rgba(10, 8, 20, .92); border: 1px solid var(--gold); color: var(--gold-hi); font-size: 13px; opacity: 0; transition: opacity .3s, transform .3s; pointer-events: none; }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Short phones ---------- */
@media (max-height: 700px) {
  .card { padding: 10px 12px; grid-template-columns: 60px 1fr; }
  .emblem { width: 60px; height: 60px; }
  .emblem-dice span { width: 26px; height: 36px; font-size: 22px; }
  .card p:not(.tag) { display: none; }
  .calendar li { padding: 4px 0 4px 26px; }
  .pt-num { font-size: clamp(80px, 26vw, 200px); }
  .howto { display: none; }
}

/* ---------- Desktop expansion ---------- */
@media (min-width: 900px) {
  :root { --header: 72px; }
  body { font-size: 16px; }
  .site-header { padding-inline: 32px; }
  .logo { font-size: 26px; }
  .pill { height: 38px; padding: 0 20px; font-size: 13px; }
  .pill-x::after { content: " でフォロー"; font-size: 12px; }
  .pill-line::after { content: "で最新情報"; }
  .rail { right: 24px; gap: 14px; }
  .rail span { display: inline; opacity: 0; transition: opacity .3s; }
  .rail button.is-active span, .rail button:hover span { opacity: 1; }
  .copy { padding-inline: 48px; }
  .eyebrow { font-size: 13px; }
  .scene-lead { font-size: 15px; }

  .hero-niki { left: 4%; bottom: 0; width: 28vw; }
  .hero-chest { right: 5%; bottom: 6%; width: 26vw; }
  .hero-sub { font-size: 14px; max-width: none; }

  .weekly { grid-template-columns: repeat(3, 1fr); max-width: 1100px; gap: 22px; }
  .card { grid-template-columns: 1fr; justify-items: center; text-align: center; padding: 26px 22px; }
  .emblem { width: 110px; height: 110px; }
  .emblem-fri { font-size: 38px; }
  .emblem-dice span { width: 48px; height: 62px; font-size: 40px; }
  .card h3 { font-size: 22px; }
  .card p:not(.tag) { font-size: 13px; display: block; }
  .lantern { width: 80px; }

  .town-copy { flex-direction: row; align-items: center; justify-content: space-between; text-align: left; }
  .town-copy .scene-head { margin: 0; max-width: 40%; }
  .town-copy .title-jp { font-size: clamp(34px, 3.6vw, 56px); }
  .sp { display: none; }
  .calendar { max-width: 520px; padding: 24px; margin-right: 4vw; }
  .calendar li { grid-template-columns: 110px 1fr; padding: 10px 0 10px 30px; }
  .calendar time { font-size: 28px; }
  .calendar h3 { font-size: 18px; }
  .calendar p { font-size: 13px; }
  .hang-sign { right: auto; left: 34%; }
  .sign b { font-size: 44px; }
  .sign span { font-size: 11px; }
  .prop { width: 18vw; }

  .pillar { width: 14vw; }
  .howto li { font-size: 14px; padding: 14px; }
  .prize { font-size: 20px; }

  .throne-chest { width: 30vw; top: 64%; }
  .final { padding-bottom: 28px; }
  .ctas { grid-template-columns: repeat(3, 1fr); max-width: 980px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .bats { display: none; }
}
