/* 夢の間 — Yume no Ma — watercolor / sumi palette */

@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+JP:wght@200;300;400;500;700;900&family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400&family=Inter:wght@100;200;300;400;500&family=JetBrains+Mono:wght@300;400&display=swap');

:root {
  /* Day — warm watercolor paper */
  --bg: #F1E8D4;
  --bg-2: #ECDFC4;
  --bg-3: #E4D2AE;
  --paper-warm: #F6EEDC;
  --ink: #2B221A;
  --ink-dim: rgba(43, 34, 26, 0.78);
  --ink-faint: rgba(43, 34, 26, 0.58);
  --line: rgba(43, 34, 26, 0.22);
  --line-strong: rgba(43, 34, 26, 0.42);
  --terra: #B5654E;
  --terra-dark: #8E4633;
  --sage: #6B7A5A;
  --gold: #B8852A;
  --plum: #6E4F60;
  --accent: var(--terra);
  --shadow: 0 30px 60px -28px rgba(43,34,26,0.35);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scrollbar-gutter: stable;
}
html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Cormorant Garamond', 'Noto Serif JP', serif;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Subtle paper grain */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 200;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' seed='3'/><feColorMatrix values='0 0 0 0 0.17  0 0 0 0 0.13  0 0 0 0 0.10  0 0 0 0.045 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  mix-blend-mode: multiply;
  opacity: 0.65;
}

body { min-height: 100vh; font-size: 18px; line-height: 1.55; }
::selection { background: var(--terra); color: var(--paper-warm); }

/* Type */
.kanji { font-family: 'Noto Serif JP', serif; font-weight: 500; letter-spacing: 0.04em; }
.serif { font-family: 'Cormorant Garamond', serif; }
.sans  { font-family: 'Inter', sans-serif; font-weight: 200; letter-spacing: 0.04em; }
.mono  { font-family: 'JetBrains Mono', monospace; font-weight: 300; }
.eyebrow {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 11px;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.eyebrow .dot {
  display: inline-block;
  width: 4px; height: 4px;
  background: var(--terra);
  border-radius: 50%;
  vertical-align: middle;
  margin: 0 12px 3px;
}

/* Layout */
.wrap { max-width: 1320px; margin: 0 auto; padding: 0 48px; }
.wrap-narrow { max-width: 920px; margin: 0 auto; padding: 0 48px; }

/* Nav */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 22px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(to bottom, rgba(241,232,212,0.95) 30%, rgba(241,232,212,0));
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.nav-mark {
  display: flex;
  align-items: baseline;
  gap: 14px;
  cursor: pointer;
}
.nav-mark .yume {
  font-family: 'Noto Serif JP', serif;
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0.08em;
  color: var(--ink);
}
.nav-mark .roman {
  font-family: 'Inter', sans-serif;
  font-weight: 200;
  font-size: 11px;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.nav-links { display: flex; gap: 38px; align-items: center; }
.nav-link {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 12px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink-dim);
  cursor: pointer;
  background: none;
  border: none;
  padding: 6px 0;
  position: relative;
  transition: color 0.4s;
}
.nav-link:hover { color: var(--ink); }
.nav-link.active { color: var(--ink); }
.nav-link.active::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  bottom: -4px;
  height: 1px;
  background: var(--terra);
}
.nav-side { display: flex; gap: 18px; align-items: center; }
.lang-toggle {
  display: flex;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 3px;
}
.lang-toggle button {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 11px;
  letter-spacing: 0.24em;
  padding: 6px 14px;
  border: none;
  background: transparent;
  color: var(--ink-dim);
  cursor: pointer;
  border-radius: 999px;
}
.lang-toggle button.active { background: var(--terra); color: var(--paper-warm); }

/* Intro overlay */
.intro {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  transition: opacity 1.4s ease, visibility 1.4s;
}
.intro.gone { opacity: 0; visibility: hidden; pointer-events: none; }
.intro-kanji {
  font-family: 'Noto Serif JP', serif;
  font-weight: 500;
  font-size: 96px;
  color: var(--ink);
  letter-spacing: 0.08em;
  opacity: 0;
  animation: introFade 2.6s ease forwards;
}
.intro-line {
  margin-top: 28px;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 300;
  font-size: 18px;
  color: var(--ink-dim);
  letter-spacing: 0.06em;
  opacity: 0;
  animation: introFade 2.6s ease 0.6s forwards;
}
.intro-skip {
  position: absolute;
  bottom: 48px;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--ink-faint);
  background: none;
  border: none;
  cursor: pointer;
  opacity: 0;
  animation: introFade 1s ease 2.2s forwards;
}
.intro-skip:hover { color: var(--ink); }
@keyframes introFade { to { opacity: 1; } }

/* Page transitions */
.page { opacity: 0; pointer-events: none; position: absolute; width: 100%; top: 0; left: 0; transition: opacity 0.7s ease; }
.page.active { opacity: 1; pointer-events: all; position: relative; }

/* HERO */
.hero {
  position: relative;
  height: 100vh;
  min-height: 760px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: 96px;
  padding-bottom: 80px;
}
@supports (height: 100svh) {
  .hero { height: 100svh; }
}
.hero-art {
  position: relative;
  z-index: 2;
  max-width: min(1180px, 92vw);
  max-height: 78vh;
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow:
    0 40px 80px -30px rgba(43,34,26,0.45),
    0 12px 28px -10px rgba(43,34,26,0.18);
  border: 1px solid rgba(43,34,26,0.12);
  opacity: 0;
  animation: heroArtIn 1.8s cubic-bezier(.2,.7,.2,1) 0.2s forwards;
  background: var(--paper-warm);
}
@keyframes heroArtIn {
  from { opacity: 0; transform: translateY(28px) scale(0.985); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse at 50% 38%, rgba(184,133,42,0.10) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 80%, rgba(181,101,78,0.08) 0%, transparent 55%);
  pointer-events: none;
}
.hero-eyebrow-top {
  position: relative;
  z-index: 3;
  margin-bottom: 28px;
  opacity: 0;
  animation: fadeUp 1.4s ease 0.1s forwards;
}
.hero-meta {
  position: absolute;
  bottom: 48px;
  left: 0; right: 0;
  display: flex;
  justify-content: space-between;
  padding: 0 48px;
  z-index: 6;
  font-family: 'Inter', sans-serif;
  font-weight: 200;
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink-dim);
  opacity: 0;
  animation: fadeUp 1.4s ease 1.4s forwards;
}
.hero-meta .scroll-cue { display: flex; align-items: center; gap: 10px; }
.scroll-cue::after {
  content: '';
  display: block;
  width: 1px;
  height: 28px;
  background: linear-gradient(to bottom, var(--terra), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { transform: scaleY(0.4); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Section general */
section { padding: 140px 0; position: relative; }
.section-label {
  display: flex;
  align-items: baseline;
  gap: 24px;
  margin-bottom: 56px;
}
.section-label .num {
  font-family: 'Noto Serif JP', serif;
  font-weight: 200;
  font-size: 16px;
  color: var(--terra);
  letter-spacing: 0.2em;
}
.section-label .lbl {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 11px;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.section-label .lbl::before {
  content: '';
  display: inline-block;
  width: 60px; height: 1px;
  background: var(--line-strong);
  vertical-align: middle;
  margin-right: 18px;
}
.section-title {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: clamp(40px, 5vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin-bottom: 24px;
  max-width: 18ch;
}
.section-title em { font-style: italic; color: var(--terra); font-weight: 400; }

/* CONCEPT */
.concept { border-top: 1px solid var(--line); }
.concept-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 80px;
  align-items: start;
}
.concept-prose p {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: 22px;
  line-height: 1.65;
  margin-bottom: 22px;
  color: var(--ink);
}
.concept-prose p.lead {
  font-size: 28px;
  font-style: italic;
  margin-bottom: 36px;
}
.concept-prose p em { font-style: italic; color: var(--terra); }
.concept-aside {
  border-left: 1px solid var(--line-strong);
  padding: 8px 0 8px 36px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.concept-fact { display: flex; flex-direction: column; gap: 6px; }
.concept-fact .key {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 10px;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.concept-fact .val {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-size: 22px;
  color: var(--ink);
}
.concept-fact .val .jp {
  font-family: 'Noto Serif JP', serif;
  font-size: 16px;
  color: var(--ink-dim);
  margin-left: 8px;
}

/* GAME LOOP */
.loop {
  background: var(--bg-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.loop-phases {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-top: 60px;
  border-top: 1px solid var(--line);
}
.phase {
  padding: 56px 36px 64px;
  border-right: 1px solid var(--line);
  position: relative;
  transition: background 0.6s, opacity 0.9s ease, transform 0.9s cubic-bezier(.2,.7,.2,1);
  opacity: 0;
  transform: translateY(18px);
}
.phase.in { opacity: 1; transform: translateY(0); }
.phase:last-child { border-right: none; }
.phase:hover { background: rgba(181,101,78,0.05); }
.phase-num {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 300;
  font-size: 14px;
  letter-spacing: 0.3em;
  color: var(--terra);
  margin-bottom: 32px;
}
.phase-icon { height: 96px; margin-bottom: 32px; display: flex; align-items: center; }
.phase-title {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-size: 36px;
  line-height: 1;
  margin-bottom: 8px;
}
.phase-title em { font-style: italic; color: var(--terra); }
.phase-title-jp {
  font-family: 'Noto Serif JP', serif;
  font-weight: 300;
  font-size: 18px;
  color: var(--ink-dim);
  margin-bottom: 28px;
  letter-spacing: 0.1em;
}
.phase-body {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: 18px;
  line-height: 1.65;
  color: var(--ink-dim);
}

/* TRAILER PLACEHOLDER */
.trailer { border-bottom: 1px solid var(--line); }
.trailer-frame {
  position: relative;
  margin-top: 40px;
  aspect-ratio: 16 / 9;
  background: #1F1A14;
  border: 1px solid var(--line-strong);
  overflow: hidden;
  transition: border-color 0.4s;
}
.trailer-frame::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 50%, rgba(181,101,78,0.12) 0%, transparent 60%),
    repeating-linear-gradient(45deg, transparent 0 20px, rgba(255,238,210,0.025) 20px 40px);
}
.trailer-frame:hover { border-color: var(--terra); }
.trailer-inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #F6EEDC;
  z-index: 2;
}
.trailer-kanji {
  font-family: 'Noto Serif JP', serif;
  font-weight: 500;
  font-size: clamp(60px, 9vw, 132px);
  letter-spacing: 0.08em;
  opacity: 0.92;
  margin-bottom: 36px;
  text-shadow: 0 0 60px rgba(181,101,78,0.4);
}
.trailer-play {
  display: flex;
  align-items: center;
  gap: 18px;
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 13px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: #F6EEDC;
  margin-bottom: 28px;
  opacity: 0.92;
}
.trailer-play .triangle {
  width: 0; height: 0;
  border-left: 12px solid #F6EEDC;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  opacity: 0.95;
}
.trailer-meta {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 300;
  font-size: 18px;
  color: rgba(246,238,220,0.65);
  letter-spacing: 0.04em;
}
.trailer-corners span {
  position: absolute;
  width: 22px; height: 22px;
  border: 1px solid rgba(246,238,220,0.4);
  z-index: 3;
}
.trailer-corners .tl { top: 18px; left: 18px; border-right: none; border-bottom: none; }
.trailer-corners .tr { top: 18px; right: 18px; border-left: none; border-bottom: none; }
.trailer-corners .bl { bottom: 18px; left: 18px; border-right: none; border-top: none; }
.trailer-corners .br { bottom: 18px; right: 18px; border-left: none; border-top: none; }
.trailer-stamp {
  position: absolute;
  bottom: 22px; left: 28px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  color: rgba(246,238,220,0.45);
  z-index: 3;
}
.trailer-stamp-r {
  position: absolute;
  bottom: 22px; right: 28px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  color: rgba(246,238,220,0.45);
  z-index: 3;
}

/* Audio player — under the trailer placeholder */
.audio-player {
  margin-top: 20px;
  display: grid;
  grid-template-columns: auto 1fr 2fr auto;
  align-items: center;
  gap: 22px;
  padding: 18px 22px;
  border: 1px solid var(--line-strong);
  background: var(--paper-warm);
}
.audio-btn {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--terra);
  background: transparent;
  color: var(--terra);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background 0.3s, color 0.3s, transform 0.3s;
  flex-shrink: 0;
}
.audio-btn:hover { background: var(--terra); color: var(--paper-warm); }
.audio-btn.playing { background: var(--terra); color: var(--paper-warm); }
.audio-btn svg { display: block; transform: translateX(1px); }
.audio-btn.playing svg { transform: none; }
.audio-meta { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.audio-title { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.audio-kanji {
  font-family: 'Noto Serif JP', serif;
  font-weight: 500;
  font-size: 18px;
  letter-spacing: 0.06em;
  color: var(--ink);
}
.audio-sep { color: var(--terra); font-family: 'Cormorant Garamond', serif; }
.audio-roman {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 16px;
  color: var(--ink-dim);
}
.audio-sub {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 10px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.audio-track {
  position: relative;
  height: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
}
.audio-track::before {
  content: '';
  position: absolute;
  inset: 11px 0;
  background: rgba(43,34,26,0.14);
}
.audio-fill {
  pointer-events: none;
  position: absolute;
  left: 0;
  top: 11px; bottom: 11px;
  background: var(--terra);
  transition: width 0.15s linear;
}
.audio-track { touch-action: none; user-select: none; }
.audio-head {
  pointer-events: none;
  position: absolute;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--terra);
  transform: translate(-50%, 0);
  top: 50%;
  margin-top: -4px;
  transition: left 0.15s linear;
}
.audio-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--ink-dim);
  letter-spacing: 0.08em;
  white-space: nowrap;
}
.audio-time span { color: var(--ink-faint); margin: 0 4px; }
@media (max-width: 720px) {
  .audio-player { grid-template-columns: auto 1fr; grid-template-rows: auto auto; gap: 14px 18px; }
  .audio-track { grid-column: 1 / -1; }
  .audio-time { grid-column: 1 / -1; text-align: right; }
}

/* CTA — Steam */
.cta {
  padding: 180px 0;
  position: relative;
  text-align: center;
  border-top: 1px solid var(--line);
  overflow: hidden;
}
.cta::before {
  content: '夢主';
  position: absolute;
  font-family: 'Noto Serif JP', serif;
  font-weight: 900;
  font-size: 540px;
  color: var(--ink);
  opacity: 0.045;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  letter-spacing: -0.05em;
  white-space: nowrap;
}
.cta-eyebrow { margin-bottom: 36px; }
.cta-title {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: clamp(48px, 6vw, 88px);
  line-height: 1.1;
  margin-bottom: 16px;
  letter-spacing: -0.01em;
  position: relative;
}
.cta-title em { font-style: italic; color: var(--terra); }
.cta-sub {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 22px;
  color: var(--ink-dim);
  margin-bottom: 64px;
  position: relative;
}
.btn-steam {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  padding: 22px 44px;
  background: var(--terra);
  color: var(--paper-warm);
  border: none;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 13px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  text-decoration: none;
  transition: transform 0.4s, background 0.4s;
  border-radius: 2px;
  position: relative;
}
.btn-steam:hover { transform: translateY(-2px); background: var(--terra-dark); }
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 22px 32px;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-strong);
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 12px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  margin-left: 16px;
  transition: border-color 0.4s, color 0.4s;
  text-decoration: none;
  position: relative;
}
.btn-secondary:hover { border-color: var(--terra); color: var(--terra); }

/* FOOTER */
.foot { border-top: 1px solid var(--line); padding: 60px 0 40px; }
.foot-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 60px;
  margin-bottom: 60px;
}
.foot-mark .yume {
  font-family: 'Noto Serif JP', serif;
  font-weight: 700;
  font-size: 32px;
  letter-spacing: 0.06em;
}
.foot-mark .tag {
  margin-top: 10px;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 16px;
  color: var(--ink-dim);
}
.foot h4 {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 20px;
}
.foot ul { list-style: none; }
.foot li {
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
  margin-bottom: 8px;
  color: var(--ink);
  cursor: pointer;
  transition: color 0.4s;
}
.foot li:hover { color: var(--terra); }

.foot-bottom {
  border-top: 1px solid var(--line);
  padding-top: 28px;
  display: flex;
  justify-content: space-between;
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink);
}

/* CHARACTERS PAGE */
.char-hero {
  padding-top: 200px;
  padding-bottom: 80px;
  text-align: center;
}
.char-hero .kanji-big {
  font-family: 'Noto Serif JP', serif;
  font-weight: 200;
  font-size: 220px;
  line-height: 1;
  color: var(--terra);
  opacity: 0.18;
  margin-bottom: -120px;
}
.char-hero .title {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: clamp(56px, 7vw, 92px);
  letter-spacing: -0.01em;
  position: relative;
  z-index: 2;
}
.char-hero .title em { font-style: italic; color: var(--terra); }
.char-hero .lede {
  margin-top: 28px;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 22px;
  color: var(--ink-dim);
  max-width: 50ch;
  margin-left: auto;
  margin-right: auto;
}

.char-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  padding: 60px 0 140px;
}

.char-card {
  position: relative;
  aspect-ratio: 3 / 4;
  border: 1px solid var(--line);
  background: var(--bg-2);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.6s cubic-bezier(.2,.6,.2,1), box-shadow 0.6s;
}
.char-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.char-portrait {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center 22%;
  transition: transform 1.4s cubic-bezier(.2,.6,.2,1);
}
.char-card:hover .char-portrait { transform: scale(1.04); }
.char-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to top, rgba(43,34,26,0.92) 0%, rgba(43,34,26,0.4) 35%, transparent 60%);
}
.char-meta {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 2;
  padding: 28px 28px 26px;
  color: var(--paper-warm);
}
.char-num {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 13px;
  letter-spacing: 0.3em;
  color: var(--terra);
  margin-bottom: 10px;
}
.char-name {
  font-family: 'Noto Serif JP', serif;
  font-weight: 500;
  font-size: 24px;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
  color: var(--paper-warm);
}
.char-name-roman {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 17px;
  color: rgba(246,238,220,0.7);
  margin-bottom: 12px;
}
.char-trait {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 10px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: rgba(246,238,220,0.6);
  margin-bottom: 14px;
}
.char-quote {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 16px;
  line-height: 1.45;
  color: rgba(246,238,220,0.85);
  border-left: 2px solid var(--terra);
  padding-left: 14px;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.7s ease, opacity 0.5s ease, margin 0.5s ease;
}
.char-card.open .char-quote { max-height: 200px; opacity: 1; }
@media (hover: hover) {
  .char-card:hover .char-quote { max-height: 200px; opacity: 1; }
}

/* responsive */
@media (max-width: 960px) {
  .wrap, .nav { padding-left: 16px; padding-right: 16px; gap: 12px; }
  .nav { flex-wrap: wrap; height: auto; padding-top: 10px; padding-bottom: 10px; row-gap: 6px; }
  .nav-mark .roman { display: none; }
  .nav-mark { gap: 0; }
  .nav-links { display: flex; order: 3; flex-basis: 100%; gap: 22px; justify-content: center; padding-top: 4px; border-top: 1px solid var(--line-strong); }
  .nav-link { font-size: 11px; }
  .lang-toggle button { width: 32px; padding: 4px 0; font-size: 10px; }
  .concept-grid { grid-template-columns: 1fr; gap: 40px; }
  .loop-phases { grid-template-columns: 1fr; }
  .phase { border-right: none; border-bottom: 1px solid var(--line); }
  .char-grid { grid-template-columns: 1fr 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .hero-content { margin-top: 60vh; }
}


/* Whisper line — Yumenushi tease */
.foot-mark .whisper {
  margin-top: 14px;
  font-family: 'Noto Serif JP', serif;
  font-weight: 300;
  font-size: 11px;
  letter-spacing: 0.5em;
  color: rgba(43,34,26,0.22);
  cursor: default;
  transition: color 0.8s ease;
}
.foot-mark .whisper:hover { color: rgba(181,101,78,0.6); }

.foot-bottom-right { display: inline-flex; align-items: center; gap: 14px; }
.foot-bottom-right .sep { color: var(--ink-faint); }
.press-link {
  background: none;
  border: none;
  color: var(--ink-faint);
  font-family: 'Inter', sans-serif;
  font-weight: 200;
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 0;
  transition: color 0.4s;
}
.press-link:hover { color: var(--terra); }

/* Age inline on character cards */
.char-age {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  color: rgba(246,238,220,0.55);
  letter-spacing: 0.06em;
  text-transform: none;
}

/* Lang toggle — three options, fixed width so toggling doesn't reflow */
.lang-toggle button { padding: 6px 0; width: 38px; text-align: center; }

/* PRESS PAGE */
.press-hero {
  padding-top: 200px;
  padding-bottom: 80px;
  text-align: center;
}
.press-title {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: clamp(56px, 7vw, 92px);
  letter-spacing: -0.01em;
}
.press-title em { font-style: italic; color: var(--terra); }
.press-sub {
  margin-top: 28px;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 22px;
  color: var(--ink-dim);
  max-width: 56ch;
  margin-left: auto; margin-right: auto;
}
.press-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 80px;
  padding: 60px 0 140px;
  align-items: start;
}
.press-side {
  position: sticky;
  top: 100px;
  border-left: 1px solid var(--line-strong);
  padding-left: 24px;
}
.press-side h4 {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 10px;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 28px 0 10px;
}
.press-side h4:first-child { margin-top: 0; }
.press-side a {
  display: block;
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
  color: var(--ink);
  text-decoration: none;
  margin-bottom: 4px;
}
.press-side a:hover { color: var(--terra); }
.press-side p { font-family: 'Cormorant Garamond', serif; font-size: 16px; color: var(--ink-dim); }
.press-side p.small { font-size: 14px; }

.press-block { margin-bottom: 90px; padding-bottom: 60px; border-bottom: 1px solid var(--line); }
.press-block:last-child { border-bottom: none; }
.num-id {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--terra);
  margin-bottom: 14px;
}
.press-block h2 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: 44px;
  margin-bottom: 28px;
  letter-spacing: -0.005em;
}
.press-block h2 em { font-style: italic; color: var(--terra); }
.press-prose p {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: 19px;
  line-height: 1.7;
  margin-bottom: 16px;
  color: var(--ink);
}
.press-prose .kanji { font-family: 'Noto Serif JP', serif; font-weight: 500; }

.factsheet { display: flex; flex-direction: column; }
.fact-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 24px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.fact-row:last-child { border-bottom: none; }
.fact-row .k {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink-dim);
  padding-top: 4px;
}
.fact-row .v {
  font-family: 'Cormorant Garamond', serif;
  font-size: 19px;
  color: var(--ink);
}
.fact-row .v .jp { font-family: 'Noto Serif JP', serif; font-size: 15px; color: var(--ink-dim); margin-left: 8px; }

.quote-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.quote-card {
  border: 1px solid var(--line-strong);
  padding: 28px;
  background: var(--paper-warm);
}
.quote-card .q {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 22px;
  color: var(--ink);
  margin-bottom: 14px;
  line-height: 1.4;
}
.quote-card .a {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 10px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.swatches { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.sw { border: 1px solid var(--line); }
.sw-color { aspect-ratio: 1.4 / 1; border-bottom: 1px solid var(--line); }
.sw-meta { padding: 14px 16px 16px; }
.sw-meta .nm { font-family: 'Cormorant Garamond', serif; font-size: 17px; color: var(--ink); margin-bottom: 4px; }
.sw-meta .hex { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--ink-faint); letter-spacing: 0.1em; }

.dl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.dl {
  border: 1px solid var(--line-strong);
  padding: 32px 26px;
  text-decoration: none;
  text-align: center;
  background: var(--paper-warm);
  transition: border-color 0.4s, transform 0.4s;
}
.dl:hover { border-color: var(--terra); transform: translateY(-2px); }
.dl .ic { font-family: 'Noto Serif JP', serif; font-weight: 500; font-size: 48px; color: var(--terra); margin-bottom: 12px; }
.dl .nm { font-family: 'Cormorant Garamond', serif; font-size: 19px; color: var(--ink); margin-bottom: 4px; }
.dl .sz { font-family: 'JetBrains Mono', monospace; font-size: 10px; color: var(--ink-faint); letter-spacing: 0.2em; }

@media (max-width: 960px) {
  .press-grid { grid-template-columns: 1fr; gap: 40px; }
  .press-side { position: static; border-left: none; border-top: 1px solid var(--line-strong); padding: 24px 0 0; }
  .quote-grid, .swatches, .dl-grid { grid-template-columns: 1fr; }
  .fact-row { grid-template-columns: 1fr; gap: 4px; }
}

/* Keyboard focus — single visual language across all interactive elements */
:focus { outline: none; }
:focus-visible {
  outline: 1px solid var(--terra);
  outline-offset: 4px;
  border-radius: 1px;
}
.btn-steam:focus-visible,
.btn-secondary:focus-visible { outline-offset: 5px; }
.lang-toggle button:focus-visible { outline-offset: 2px; }
.audio-btn:focus-visible { outline-offset: 3px; }
.audio-track:focus-visible { outline-offset: 6px; }
.char-card:focus-visible { outline-offset: 3px; }
.trailer-frame:focus-visible { outline-offset: -2px; }

/* Reduced motion — keep the work calm for sensitive users */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .hero-art { opacity: 1; transform: none; }
  .intro-kanji, .intro-line, .intro-skip { opacity: 1; }
  .scroll-cue::after { animation: none; opacity: 0.6; transform: scaleY(0.7); }
}

/* Phone breakpoint */
@media (max-width: 600px) {
  /* General rhythm */
  section { padding: 80px 0; }
  .section-label { margin-bottom: 36px; gap: 14px; }
  .section-label .lbl::before { width: 28px; margin-right: 12px; }

  /* Hero — keep viewport height, but anchor content to top so pustota
     drops below (not above) the artwork. Meta stays pinned to bottom. */
  .hero {
    min-height: 0;
    justify-content: flex-start;
    padding-top: 130px;
    padding-bottom: 90px;
  }
  .hero-art { max-height: none; }
  .hero-eyebrow-top {
    margin-bottom: 32px;
    padding: 0 24px;
    text-align: center;
  }
  /* Drop decorative dots on mobile — they orphan to their own line on wrap */
  .eyebrow .dot { display: none; }
  .hero-meta {
    bottom: 24px;
    padding: 0 16px;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-size: 9px;
    letter-spacing: 0.22em;
    text-align: center;
  }
  .scroll-cue { justify-content: center; }
  .scroll-cue::after { height: 18px; }

  /* Concept */
  .concept-prose p { font-size: 18px; }
  .concept-prose p.lead { font-size: 22px; margin-bottom: 24px; }
  .concept-aside { padding-left: 20px; gap: 22px; }
  .concept-fact .val { font-size: 19px; }

  /* Loop */
  .phase { padding: 40px 24px 44px; }
  .phase-title { font-size: 30px; }
  .phase-body { font-size: 16px; }
  .phase-icon { height: 72px; margin-bottom: 22px; }

  /* Trailer */
  .trailer-frame { aspect-ratio: 4 / 5; }
  .trailer-stamp, .trailer-stamp-r { bottom: 14px; font-size: 9px; }
  .trailer-stamp { left: 16px; }
  .trailer-stamp-r { right: 16px; }
  .trailer-corners span { width: 16px; height: 16px; }
  .trailer-corners .tl, .trailer-corners .tr { top: 12px; }
  .trailer-corners .bl, .trailer-corners .br { bottom: 12px; }
  .trailer-corners .tl, .trailer-corners .bl { left: 12px; }
  .trailer-corners .tr, .trailer-corners .br { right: 12px; }
  .trailer-kanji { margin-bottom: 24px; }
  .trailer-play { font-size: 11px; letter-spacing: 0.32em; margin-bottom: 18px; }
  .trailer-meta { font-size: 15px; padding: 0 24px; }

  /* CTA */
  .wrap-narrow { padding: 0 20px; }
  .cta { padding: 100px 0; }
  .cta::before { font-size: 60vw; }
  .cta-sub { font-size: 18px; margin-bottom: 44px; }
  .btn-steam,
  .btn-secondary {
    display: flex;
    width: 100%;
    justify-content: center;
    white-space: nowrap;
  }
  .btn-steam { padding: 16px 26px; font-size: 11px; letter-spacing: 0.22em; gap: 12px; }
  .btn-secondary { padding: 16px 24px; font-size: 11px; letter-spacing: 0.22em; margin-left: 0; margin-top: 14px; }

  /* Characters */
  .char-hero { padding-top: 140px; padding-bottom: 40px; }
  .char-hero .kanji-big { font-size: 140px; margin-bottom: -70px; }
  .char-hero .lede { font-size: 18px; margin-top: 20px; }
  .char-grid { grid-template-columns: 1fr; gap: 20px; padding: 40px 0 80px; }
  .char-card { aspect-ratio: 4 / 5; }
  .char-meta { padding: 22px 22px 22px; }

  /* Footer */
  .foot { padding: 48px 0 32px; }
  .foot-grid { grid-template-columns: 1fr; gap: 36px; margin-bottom: 40px; }
  .foot-mark .whisper { letter-spacing: 0.32em; font-size: 10px; word-break: break-word; }
  .foot-bottom { flex-direction: column; gap: 14px; align-items: flex-start; }

  /* Press */
  .press-hero { padding-top: 140px; padding-bottom: 40px; }
  .press-block h2 { font-size: 32px; margin-bottom: 20px; }
  .press-prose p { font-size: 17px; }
  .press-block { margin-bottom: 56px; padding-bottom: 36px; }

  /* Intro */
  .intro-kanji { font-size: 72px; }
  .intro-line { font-size: 16px; padding: 0 24px; text-align: center; }
}
