:root {
  --ink: #f6efe4;
  --muted: #d9cbb8;
  --gold: #e7c27a;
  --ember: #ff8a3d;
  --bg: #100c0a;
  --line: rgba(231, 194, 122, 0.35);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body.sk-show {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", sans-serif;
  overflow-x: hidden;
}

a { color: inherit; }

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: #fff;
  color: #1a120c;
  padding: 0.5rem 0.8rem;
  z-index: 20;
}

.skip:focus { top: 1rem; }

.bar {
  position: fixed;
  z-index: 10;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.25rem;
  background: linear-gradient(to bottom, rgba(10, 7, 6, 0.72), transparent);
}

.brand {
  font-family: "Shippori Mincho", serif;
  letter-spacing: 0.18em;
  text-decoration: none;
  font-size: 0.95rem;
}

.bar-actions { display: flex; gap: 0.6rem; align-items: center; }

.ghost,
.play {
  text-decoration: none;
  border-radius: 999px;
  padding: 0.55rem 1rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.ghost { border: 1px solid var(--line); background: rgba(16, 12, 10, 0.35); }

.play {
  background: var(--gold);
  color: #24180f;
  font-weight: 700;
}

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-items: end;
  isolation: isolate;
}

.hero img,
.chapter img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero img {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(10, 7, 6, 0.15) 0%, rgba(10, 7, 6, 0.05) 40%, rgba(10, 7, 6, 0.88) 100%);
  pointer-events: none;
}

.hero-copy,
.chapter-copy {
  position: relative;
  z-index: 2;
  padding: 18vh 8vw 8vh;
  max-width: 46rem;
}

.kicker {
  margin: 0 0 0.6rem;
  letter-spacing: 0.28em;
  font-size: 0.78rem;
  color: var(--gold);
}

h1, h2 {
  font-family: "Shippori Mincho", serif;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin: 0;
}

h1 {
  font-size: clamp(3.4rem, 11vw, 7.6rem);
  line-height: 1;
  white-space: nowrap;
}

.lede {
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.8;
  color: var(--muted);
  max-width: 28rem;
}

.hero-play {
  margin-top: 1.4rem;
  font-size: 1.05rem;
  padding: 0.8rem 1.4rem;
}

.facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.facts div { padding: 1.6rem 1.2rem 1.4rem; }

.facts strong {
  display: block;
  font-family: "Shippori Mincho", serif;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  color: var(--gold);
}

.facts span { color: var(--muted); font-size: 0.92rem; }

.chapter {
  position: relative;
  min-height: 88svh;
  display: grid;
  align-items: end;
  isolation: isolate;
}

.chapter img { position: absolute; inset: 0; z-index: 0; }

.cast {
  padding: 4.5rem 0 3rem;
  background:
    radial-gradient(ellipse at center, #2a211c 0%, #100c0a 70%);
}

.cast h2, .close h2 { text-align: center; font-size: clamp(2rem, 4vw, 3.2rem); }

.cast-note, .close p {
  text-align: center;
  color: var(--muted);
  margin: 0.8rem auto 0;
  max-width: 36rem;
  line-height: 1.8;
  padding: 0 1.2rem;
}

.rail {
  display: grid;
  grid-template-columns: repeat(10, minmax(4.6rem, 1fr));
  gap: 0.4rem;
  margin: 2rem auto 0;
  padding: 0 1.2rem;
  max-width: 76rem;
}

.rail figure { margin: 0; text-align: center; }

.rail img {
  width: 100%;
  height: auto;
  image-rendering: pixelated;
  filter: drop-shadow(0 10px 0 rgba(0, 0, 0, 0.35));
}

.rail figcaption { font-size: 0.75rem; letter-spacing: 0.08em; color: var(--muted); }

.parade {
  display: flex;
  gap: 1.2rem;
  overflow: hidden;
  padding: 1.2rem 0 2rem;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.parade-track {
  display: flex;
  gap: 1.2rem;
  animation: march 36s linear infinite;
}

.parade img {
  width: 7.5rem;
  height: 7.5rem;
  object-fit: contain;
  image-rendering: pixelated;
}

.close {
  padding: 5rem 1.2rem 4rem;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(16, 12, 10, 0.2), rgba(16, 12, 10, 0.92)),
    url("img/stair.jpg") center 30% / cover no-repeat;
}

.foot {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1rem 1.25rem 1.4rem;
  color: var(--muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--line);
}

.foot a { color: var(--gold); }

@keyframes march {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (max-width: 800px) {
  .facts { grid-template-columns: 1fr 1fr; }
  .rail { grid-template-columns: repeat(5, 1fr); }
  .ghost { display: none; }
  h1 { font-size: clamp(3.4rem, 18vw, 5rem); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .parade-track { animation: none; }
}
