:root {
  --navy-950: #060f18;
  --navy-900: #0b1f2e;
  --navy-800: #14304a;
  --navy-700: #1d4260;
  --gold: #c9a24a;
  --gold-light: #ecd9a3;
  --gold-dim: #8a7134;
  --cream: #f3ead2;
  --cream-2: #ece0c0;
  --ink: #2b2013;
  --ink-soft: #4a3c26;
  --serif-jp: 'Noto Serif JP', serif;
  --serif-en: 'Cormorant Garamond', serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--navy-950);
  color: var(--cream);
  font-family: var(--serif-jp);
  line-height: 1.9;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

a { color: var(--gold-light); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- background stars ---------- */
.stagebg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, var(--navy-950) 0%, var(--navy-900) 40%, var(--navy-950) 100%);
}
.stars {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1.5px 1.5px at 10% 12%, rgba(236,217,163,0.55), transparent),
    radial-gradient(1.5px 1.5px at 22% 38%, rgba(236,217,163,0.4), transparent),
    radial-gradient(1px 1px at 35% 8%, rgba(236,217,163,0.5), transparent),
    radial-gradient(1.5px 1.5px at 48% 25%, rgba(236,217,163,0.4), transparent),
    radial-gradient(1px 1px at 63% 15%, rgba(236,217,163,0.5), transparent),
    radial-gradient(1.5px 1.5px at 78% 32%, rgba(236,217,163,0.45), transparent),
    radial-gradient(1px 1px at 88% 10%, rgba(236,217,163,0.5), transparent),
    radial-gradient(1.5px 1.5px at 92% 45%, rgba(236,217,163,0.4), transparent),
    radial-gradient(1px 1px at 15% 60%, rgba(236,217,163,0.35), transparent),
    radial-gradient(1.5px 1.5px at 70% 65%, rgba(236,217,163,0.35), transparent);
  background-repeat: repeat;
  background-size: 100% 900px;
  opacity: 0.9;
}

/* ---------- site head ---------- */
.sitehead {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  padding: 0.9em 1em 0.7em;
  font-family: var(--serif-en);
  letter-spacing: 0.12em;
  font-size: 0.85rem;
  color: var(--gold-light);
  background: linear-gradient(180deg, rgba(6,15,24,0.75), transparent);
  pointer-events: none;
}
.sitehead-mark { color: var(--gold); font-size: 0.9em; }
.sitehead-title { font-family: var(--serif-jp); }

/* ---------- reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem 1.25rem 4rem;
}

.corner {
  position: absolute;
  width: 64px; height: 64px;
  border: 2px solid var(--gold-dim);
  opacity: 0.7;
}
.corner-tl { top: 18px; left: 18px; border-right: none; border-bottom: none; }
.corner-tr { top: 18px; right: 18px; border-left: none; border-bottom: none; }
.corner-bl { bottom: 18px; left: 18px; border-right: none; border-top: none; }
.corner-br { bottom: 18px; right: 18px; border-left: none; border-top: none; }

.hero-inner { max-width: 760px; }

.hero-eyebrow {
  font-family: var(--serif-en);
  letter-spacing: 0.32em;
  font-size: 0.78rem;
  color: var(--gold);
  margin: 0 0 1.4rem;
  text-indent: 0.32em;
}

.hero-title-main {
  display: inline-block;
  font-size: clamp(2.4rem, 7vw, 4.2rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  background: linear-gradient(180deg, var(--gold-light) 10%, var(--gold) 55%, var(--gold-dim) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 34px rgba(201,162,74,0.25);
}
.hero-title { margin: 0; }

.hero-title-sub {
  font-family: var(--serif-en);
  letter-spacing: 0.3em;
  font-size: 0.8rem;
  color: rgba(243,234,210,0.6);
  margin: 0.8rem 0 2.2rem;
}

.hero-art { position: relative; margin: 0 auto 2rem; max-width: 520px; }
.hero-art-img { width: 100%; position: relative; z-index: 1; filter: drop-shadow(0 18px 40px rgba(0,0,0,0.55)); }
.hero-art-glow {
  position: absolute;
  left: 50%; top: 55%;
  width: 90%; height: 60%;
  transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(201,162,74,0.28), transparent 72%);
  z-index: 0;
}

.hero-lede {
  font-size: 1.02rem;
  color: rgba(243,234,210,0.88);
  margin: 0 0 1.6rem;
}

.hero-tags { display: flex; gap: 0.6rem; justify-content: center; flex-wrap: wrap; }
.tag {
  font-family: var(--serif-en);
  letter-spacing: 0.06em;
  font-size: 0.82rem;
  border: 1px solid var(--gold-dim);
  color: var(--gold-light);
  padding: 0.35em 1em;
  border-radius: 999px;
}

.scrolldown {
  position: absolute;
  bottom: 2rem; left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}
.scrolldown-line {
  width: 1px; height: 44px;
  background: linear-gradient(180deg, var(--gold), transparent);
  animation: scrollpulse 2.2s ease-in-out infinite;
}
.scrolldown-label {
  font-family: var(--serif-en);
  letter-spacing: 0.3em;
  font-size: 0.68rem;
  color: var(--gold-dim);
}
@keyframes scrollpulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

/* ---------- dividers / section titles ---------- */
.ornament-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  margin: 0 auto 1.6rem;
  max-width: 320px;
}
.ornament-divider span { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--gold-dim), transparent); }
.ornament-divider i { color: var(--gold); font-style: normal; font-size: 0.9rem; }

.section-title {
  text-align: center;
  font-size: clamp(1.5rem, 3.6vw, 2rem);
  letter-spacing: 0.14em;
  color: var(--gold-light);
  margin: 0 0 0.6rem;
  font-weight: 600;
}
.section-lede {
  text-align: center;
  color: rgba(243,234,210,0.75);
  max-width: 520px;
  margin: 0 auto 2.6rem;
  font-size: 0.95rem;
}

.section {
  padding: 5.5rem 1.25rem;
  max-width: 980px;
  margin: 0 auto;
}

/* ---------- story ---------- */
.story-epigraph {
  max-width: 620px;
  margin: 0 auto 3rem;
  padding: 2.2rem 2rem;
  border-left: 2px solid var(--gold-dim);
  background: linear-gradient(180deg, rgba(201,162,74,0.06), transparent);
}
.story-epigraph p {
  font-family: var(--serif-jp);
  font-style: normal;
  font-size: 1.02rem;
  color: var(--cream);
  margin: 0 0 1.1rem;
}
.story-epigraph-turn { color: var(--gold-light) !important; }
.story-epigraph-small {
  font-size: 0.9rem !important;
  color: rgba(243,234,210,0.65) !important;
  margin-bottom: 0 !important;
}

.story-body {
  max-width: 620px;
  margin: 0 auto;
  color: rgba(243,234,210,0.85);
  font-size: 0.98rem;
}
.story-body p { margin: 0 0 1.3rem; }
.story-body-strong { color: var(--gold-light); }

.closing-line {
  text-align: center;
  margin: 3rem auto 0;
  border-left: none;
  padding: 0;
}

/* ---------- characters ---------- */
.charstage {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 1.5rem;
  align-items: start;
}

.chartabs {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  position: sticky;
  top: 5.5rem;
}
.chartab {
  all: unset;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.8rem 1rem;
  border-radius: 10px;
  border: 1px solid transparent;
  color: rgba(243,234,210,0.55);
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.chartab-role { font-size: 0.72rem; letter-spacing: 0.08em; }
.chartab-name { font-size: 1.05rem; font-weight: 600; }
.chartab:hover { color: var(--cream); background: rgba(201,162,74,0.08); }
.chartab.is-active {
  color: var(--gold-light);
  background: rgba(201,162,74,0.12);
  border-color: var(--gold-dim);
}

.charpanels { position: relative; min-height: 480px; }
.charpanel {
  display: none;
  grid-template-columns: 220px 1fr;
  gap: 2rem;
  align-items: center;
  padding: 2rem;
  border-radius: 18px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 30%, var(--navy-900)) 0%, var(--navy-900) 70%);
  border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent);
  animation: panelIn 0.5s ease;
}
.charpanel.is-active { display: grid; }
@keyframes panelIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.charpanel-art {
  border-radius: 12px;
  overflow: hidden;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 45%, transparent), transparent 75%);
}
.charpanel-role {
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  color: color-mix(in srgb, var(--accent) 55%, var(--gold-light));
  margin: 0 0 0.2rem;
}
.charpanel-name {
  font-size: 1.7rem;
  margin: 0 0 0.9rem;
  color: var(--cream);
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
  flex-wrap: wrap;
}
.charpanel-age { font-size: 0.85rem; color: rgba(243,234,210,0.55); font-weight: 400; }
.charpanel-copy {
  font-size: 0.92rem;
  color: rgba(243,234,210,0.8);
  margin: 0 0 1.2rem;
}
.charpanel-quote {
  margin: 0;
  padding: 0.9rem 1.1rem;
  border-left: 2px solid var(--accent);
  background: rgba(0,0,0,0.18);
  font-size: 0.9rem;
  color: var(--gold-light);
  font-style: normal;
}

/* ---------- info ---------- */
.infogrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.infocard {
  padding: 1.4rem 1.2rem;
  border: 1px solid var(--gold-dim);
  border-radius: 12px;
  background: rgba(201,162,74,0.04);
  text-align: center;
}
.infocard-label {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--gold);
  margin: 0 0 0.5rem;
}
.infocard-value {
  font-size: 1rem;
  color: var(--cream);
  margin: 0;
}
.nowrap { white-space: nowrap; }
.infocard-note {
  display: block;
  font-size: 0.76rem;
  color: rgba(243,234,210,0.5);
  margin-top: 0.3rem;
}

/* ---------- footer ---------- */
.footer {
  text-align: center;
  padding: 4.5rem 1.25rem 3.5rem;
  max-width: 640px;
  margin: 0 auto;
}
.footer-cta {
  font-size: 1rem;
  color: var(--cream);
  margin: 0 0 1.2rem;
}
.footer-links {
  display: flex;
  gap: 1.6rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2.4rem;
  font-family: var(--serif-en);
  letter-spacing: 0.03em;
}
.footer-links a {
  border: 1px solid var(--gold-dim);
  padding: 0.55em 1.4em;
  border-radius: 999px;
  color: var(--gold-light);
}
.footer-links a:hover { background: rgba(201,162,74,0.12); text-decoration: none; }
.footer-note {
  font-size: 0.78rem;
  line-height: 1.8;
  color: rgba(243,234,210,0.45);
  margin: 0 0 1.2rem;
}
.footer-copy {
  font-size: 0.72rem;
  color: rgba(243,234,210,0.3);
  margin: 0;
}

/* ---------- responsive ---------- */
@media (max-width: 780px) {
  .charstage { grid-template-columns: 1fr; position: relative; }
  .chartabs {
    position: static;
    flex-direction: row;
    overflow-x: auto;
    gap: 0.5rem;
    padding-bottom: 0.3rem;
    scroll-snap-type: x proximity;
  }
  .chartab { flex: 0 0 auto; padding: 0.6rem 0.9rem; scroll-snap-align: start; }
  .charstage::after {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 2.5rem; height: 3.6rem;
    background: linear-gradient(90deg, transparent, var(--navy-950));
    pointer-events: none;
  }
  .charpanel { grid-template-columns: 1fr; text-align: center; padding: 1.6rem; }
  .charpanel-art { max-width: 220px; margin: 0 auto; }
  .charpanel-name { justify-content: center; }
  .infogrid { grid-template-columns: repeat(2, 1fr); }
  .lg-only { display: none; }
}

@media (max-width: 480px) {
  .section { padding: 4rem 1rem; }
  .infogrid { grid-template-columns: 1fr; }
  .story-epigraph { padding: 1.6rem 1.3rem; }
  .hero { padding: 5rem 1rem 3.5rem; }
}
