:root {
  --ink: #17243b;
  --ink-soft: #334155;
  --paper: #f3eee4;
  --paper-light: #fbf8f1;
  --paper-deep: #e8dfd0;
  --navy: #1b2d4d;
  --navy-deep: #111d33;
  --red: #9c4238;
  --red-deep: #75322e;
  --gold: #bd9655;
  --gold-light: #d7b875;
  --sage: #52634f;
  --line: rgba(23, 36, 59, 0.18);
  --line-strong: rgba(23, 36, 59, 0.34);
  --shadow: 0 24px 70px rgba(26, 32, 43, 0.13);
  --shadow-small: 0 12px 30px rgba(26, 32, 43, 0.1);
  --serif: "Shippori Mincho", "Yu Mincho", "Hiragino Mincho ProN", serif;
  --display: "Cormorant Garamond", "Shippori Mincho", serif;
  --header-height: 82px;
  --content: min(1180px, calc(100vw - 64px));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--paper);
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.9;
  background:
    radial-gradient(circle at 16% 14%, rgba(189, 150, 85, 0.1), transparent 28rem),
    radial-gradient(circle at 84% 38%, rgba(82, 99, 79, 0.08), transparent 32rem),
    var(--paper);
}

button,
input,
textarea,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

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

[hidden] {
  display: none !important;
}

::selection {
  color: var(--paper-light);
  background: var(--red);
}

:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 12px;
  padding: 8px 14px;
  color: white;
  background: var(--ink);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: none;
}

.paper-grain {
  position: fixed;
  z-index: 50;
  inset: 0;
  opacity: 0.13;
  pointer-events: none;
  background-image:
    url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.95' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.25'/%3E%3C/svg%3E");
}

.color-thread {
  position: fixed;
  z-index: -1;
  top: 0;
  right: 5vw;
  width: 1px;
  height: 100vh;
  opacity: 0.38;
  background: linear-gradient(
    to bottom,
    #747b83,
    #745290 20%,
    #344f87 34%,
    #79c6d2 47%,
    #4d7650 60%,
    #d5ad4e 72%,
    #c66b36 84%,
    #9d3d38
  );
}

.content-width {
  width: var(--content);
  margin-inline: auto;
}

.site-header {
  position: sticky;
  z-index: 40;
  top: 0;
  display: grid;
  grid-template-columns: minmax(210px, 1fr) auto minmax(160px, 1fr);
  align-items: center;
  min-height: var(--header-height);
  padding: 0 34px;
  border-bottom: 1px solid var(--line);
  background: rgba(243, 238, 228, 0.88);
  backdrop-filter: blur(18px) saturate(0.9);
}

.wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 14px;
  width: fit-content;
  text-decoration: none;
}

.wordmark-en {
  font-family: var(--display);
  font-size: 32px;
  font-style: italic;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.02em;
}

.wordmark-sub {
  color: var(--ink-soft);
  font-family: var(--display);
  font-size: 9px;
  letter-spacing: 0.19em;
}

.primary-nav {
  display: flex;
  align-items: stretch;
  gap: 4px;
  height: var(--header-height);
}

.primary-nav a {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 72px;
  padding-inline: 16px;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-decoration: none;
  transition: color 180ms ease;
}

.primary-nav a::after {
  position: absolute;
  right: 14px;
  bottom: -1px;
  left: 14px;
  height: 2px;
  content: "";
  background: var(--red);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 220ms ease;
}

.primary-nav a:hover,
.primary-nav a.is-active {
  color: var(--red-deep);
}

.primary-nav a.is-active::after {
  transform: scaleX(1);
}

.header-status {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 9px;
  color: var(--ink-soft);
  font-family: var(--display);
  font-size: 11px;
  letter-spacing: 0.16em;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--sage);
  box-shadow: 0 0 0 5px rgba(82, 99, 79, 0.12);
}

.page {
  min-height: calc(100vh - var(--header-height));
  animation: page-in 420ms ease both;
}

@keyframes page-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

.eyebrow,
.section-kicker {
  margin: 0;
  color: var(--red);
  font-family: var(--display);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.19em;
  text-transform: uppercase;
}

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 48px;
  padding: 10px 22px;
  border: 1px solid var(--ink);
  border-radius: 0;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-decoration: none;
  transition:
    color 180ms ease,
    background-color 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  color: var(--paper-light);
  background: var(--ink);
  box-shadow: 6px 6px 0 rgba(156, 66, 56, 0.22);
}

.button-primary:hover {
  background: var(--red-deep);
  box-shadow: 8px 8px 0 rgba(156, 66, 56, 0.18);
}

.button-quiet {
  color: var(--ink);
  background: rgba(251, 248, 241, 0.45);
}

.button-quiet:hover {
  color: var(--paper-light);
  background: var(--ink);
}

.text-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0 8px;
  border: 0;
  border-bottom: 1px solid var(--ink);
  color: var(--ink);
  cursor: pointer;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.text-link::after {
  content: "↗";
  transition: transform 180ms ease;
}

.text-link:hover::after {
  transform: translate(3px, -3px);
}

/* Home */

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(540px, 1.12fr);
  min-height: min(830px, calc(100vh - var(--header-height)));
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero::before {
  position: absolute;
  top: 80px;
  left: -40px;
  width: 440px;
  height: 440px;
  border: 1px solid rgba(189, 150, 85, 0.24);
  border-radius: 50%;
  content: "";
}

.hero-copy {
  position: relative;
  z-index: 3;
  align-self: center;
  max-width: 660px;
  padding: 80px 40px 110px max(64px, calc((100vw - 1180px) / 2));
}

.hero-copy h1 {
  margin: 22px 0 30px;
}

.hero-title {
  display: block;
  margin-left: -6px;
  font-family: var(--display);
  font-size: clamp(92px, 10vw, 172px);
  font-style: italic;
  font-weight: 500;
  line-height: 0.64;
  letter-spacing: -0.055em;
}

.hero-title-jp {
  display: block;
  margin-top: 40px;
  font-size: clamp(28px, 3.5vw, 49px);
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.02em;
}

.hero-lead {
  max-width: 540px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 2.15;
}

.hero-actions {
  display: flex;
  gap: 12px;
  margin-top: 38px;
}

.hero-art {
  position: relative;
  min-height: 660px;
  overflow: hidden;
  background:
    linear-gradient(92deg, var(--paper) 0%, rgba(243, 238, 228, 0.34) 24%, transparent 50%),
    linear-gradient(to bottom, rgba(243, 238, 228, 0.1), rgba(23, 36, 59, 0.15)),
    var(--paper-light);
}

.hero-inkwash {
  position: absolute;
  inset: 5% 0 0 4%;
  opacity: 0.8;
  background:
    radial-gradient(ellipse at 58% 50%, rgba(27, 45, 77, 0.16), transparent 48%),
    conic-gradient(from 145deg at 68% 50%, rgba(27, 45, 77, 0.03), rgba(189, 150, 85, 0.16), rgba(156, 66, 56, 0.08), transparent 68%);
  filter: blur(1px);
  clip-path: polygon(17% 2%, 100% 0, 100% 100%, 2% 100%, 0 30%);
}

.hero-irisia {
  position: absolute;
  top: 18px;
  right: max(7vw, 56px);
  width: auto;
  height: calc(100% - 24px);
  max-width: none;
  filter: drop-shadow(0 22px 30px rgba(23, 36, 59, 0.16));
  transform: rotate(0.2deg);
}

.palette-orbit {
  position: absolute;
  z-index: 2;
  right: clamp(28px, 4vw, 80px);
  bottom: 11%;
  width: clamp(112px, 10vw, 164px);
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid rgba(189, 150, 85, 0.68);
  border-radius: 50%;
  background: #f3d2a6;
  box-shadow:
    0 18px 40px rgba(23, 36, 59, 0.18),
    0 0 0 10px rgba(243, 238, 228, 0.82);
}

.palette-orbit img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
  transform: scale(1.08);
}

.hero-caption {
  position: absolute;
  z-index: 4;
  top: 28px;
  right: 34px;
  display: flex;
  gap: 12px;
  color: rgba(23, 36, 59, 0.62);
  font-family: var(--display);
  font-size: 10px;
  letter-spacing: 0.15em;
}

.hero-caption span + span::before {
  margin-right: 12px;
  content: "·";
}

.hero-color-script {
  position: absolute;
  z-index: 6;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  height: 10px;
}

.hero-color-script span {
  background: var(--swatch);
}

.hero-color-script .rainbow-swatch {
  background: linear-gradient(90deg, #754d88, #3d5c9a, #62aeb6, #668754, #d0a347, #bd6538, #9e3d38);
}

.home-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 22px;
  padding-block: 72px 36px;
}

.music-card,
.project-card {
  position: relative;
  min-height: 260px;
  border: 1px solid var(--line);
  background: rgba(251, 248, 241, 0.74);
  box-shadow: var(--shadow-small);
}

.music-card {
  display: grid;
  grid-template-columns: 230px 1fr;
  align-items: center;
  gap: 28px;
  overflow: hidden;
  padding: 32px 40px;
}

.music-card::after {
  position: absolute;
  right: -40px;
  bottom: -70px;
  width: 240px;
  height: 240px;
  border: 1px solid rgba(156, 66, 56, 0.18);
  border-radius: 50%;
  content: "";
}

.music-vinyl {
  position: relative;
  width: 200px;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    repeating-radial-gradient(circle, transparent 0 6px, rgba(255, 255, 255, 0.07) 7px 8px),
    radial-gradient(circle, var(--gold-light) 0 8%, var(--paper-light) 8.4% 20%, var(--red) 20.5% 22%, var(--navy-deep) 22.4%);
  box-shadow: 12px 18px 35px rgba(17, 29, 51, 0.24);
  animation: record-spin 22s linear infinite;
}

.music-vinyl span {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--navy-deep);
  transform: translate(-50%, -50%);
}

@keyframes record-spin {
  to {
    transform: rotate(360deg);
  }
}

.music-copy h2,
.project-card h2 {
  margin: 8px 0 12px;
  font-size: 30px;
  font-weight: 500;
}

.music-copy h2 small {
  color: var(--red);
  font-family: var(--display);
  font-size: 15px;
  font-style: italic;
}

.music-copy p {
  margin: 0 0 20px;
  color: var(--ink-soft);
  font-size: 13px;
}

.music-copy audio {
  width: 100%;
  height: 36px;
}

.music-time {
  position: absolute;
  right: 24px;
  bottom: 14px;
  color: rgba(23, 36, 59, 0.46);
  font-family: var(--display);
  font-size: 11px;
  letter-spacing: 0.14em;
}

.project-card {
  padding: 32px 34px;
}

.progress-rail {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 5px;
  margin: 30px 0 28px;
}

.progress-rail span {
  height: 6px;
  background: var(--paper-deep);
}

.progress-rail span.is-done {
  background: var(--sage);
}

.progress-rail span.is-current {
  background: var(--red);
  box-shadow: 0 0 0 4px rgba(156, 66, 56, 0.1);
}

.status-list {
  display: grid;
  gap: 8px;
  margin: 0;
}

.status-list div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 7px;
  border-bottom: 1px dotted var(--line-strong);
}

.status-list dt {
  color: var(--ink-soft);
  font-size: 12px;
}

.status-list dd {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
}

.manifesto {
  display: grid;
  grid-template-columns: 90px 1fr 1.25fr;
  align-items: start;
  gap: 28px;
  margin-block: 86px;
  padding-block: 38px;
  border-block: 1px solid var(--line-strong);
}

.manifesto-number {
  color: rgba(156, 66, 56, 0.28);
  font-family: var(--display);
  font-size: 72px;
  font-style: italic;
  line-height: 0.8;
}

.manifesto h2 {
  margin: 8px 0 0;
  font-size: clamp(25px, 2.4vw, 38px);
  font-weight: 500;
  line-height: 1.55;
}

.manifesto > p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 2.15;
}

.canon-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  padding-bottom: 120px;
}

.canon-card {
  position: relative;
  min-height: 230px;
  padding: 36px 32px;
  border-left: 2px solid var(--gold);
  background: rgba(251, 248, 241, 0.5);
}

.canon-card > span {
  color: rgba(23, 36, 59, 0.25);
  font-family: var(--display);
  font-size: 13px;
  letter-spacing: 0.12em;
}

.canon-card h3 {
  margin: 16px 0 12px;
  font-size: 28px;
  font-weight: 500;
}

.canon-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
}

/* Shared page headers */

.page-intro {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  align-items: end;
  gap: 80px;
  padding-top: 94px;
  padding-bottom: 70px;
  border-bottom: 1px solid var(--line-strong);
}

.page-intro .eyebrow {
  grid-column: 1 / -1;
  margin-bottom: -50px;
}

.page-intro h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(70px, 8vw, 126px);
  font-style: italic;
  font-weight: 500;
  line-height: 0.78;
  letter-spacing: -0.04em;
}

.page-intro > p:last-child {
  margin: 0;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 2.1;
}

/* Characters */

.character-list {
  padding-block: 90px 140px;
}

.character-feature {
  display: grid;
  grid-template-columns: minmax(360px, 0.95fr) minmax(380px, 1.05fr);
  align-items: center;
  gap: clamp(50px, 8vw, 120px);
  min-height: 650px;
  padding-block: 58px;
  border-bottom: 1px solid var(--line);
}

.character-feature-reverse .character-portrait {
  order: 2;
}

.character-feature-reverse .character-copy {
  order: 1;
}

.character-portrait {
  position: relative;
  height: 610px;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    linear-gradient(140deg, rgba(189, 150, 85, 0.12), transparent 45%),
    var(--paper-light);
  box-shadow: var(--shadow);
}

.character-portrait::before,
.character-portrait::after {
  position: absolute;
  z-index: 2;
  content: "";
  pointer-events: none;
}

.character-portrait::before {
  inset: 14px;
  border: 1px solid rgba(23, 36, 59, 0.14);
}

.character-portrait::after {
  right: 22px;
  bottom: 22px;
  width: 70px;
  height: 70px;
  border-right: 1px solid var(--gold);
  border-bottom: 1px solid var(--gold);
}

.character-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 600ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.character-feature:hover .character-portrait img {
  transform: scale(1.018);
}

.palette-portrait img {
  object-position: 43% top;
}

.portrait-index {
  position: absolute;
  z-index: 3;
  top: 24px;
  left: 26px;
  color: var(--red);
  font-family: var(--display);
  font-size: 13px;
  letter-spacing: 0.14em;
}

.character-role {
  margin: 0 0 12px;
  color: var(--red);
  font-family: var(--display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
}

.character-copy h2 {
  margin: 0;
  font-size: clamp(36px, 4vw, 58px);
  font-weight: 500;
  line-height: 1.3;
}

.character-copy h2 small {
  display: block;
  margin-top: 5px;
  color: rgba(23, 36, 59, 0.45);
  font-family: var(--display);
  font-size: 19px;
  font-style: italic;
  letter-spacing: 0.12em;
}

.character-tagline {
  margin: 26px 0 24px;
  color: var(--red-deep);
  font-size: 18px;
}

.character-copy > p:not(.character-role, .character-tagline) {
  max-width: 590px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 2.15;
}

.character-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 30px 0 24px;
}

.character-facts div {
  padding-top: 13px;
  border-top: 1px solid var(--line-strong);
}

.character-facts dt {
  color: rgba(23, 36, 59, 0.54);
  font-size: 10px;
  letter-spacing: 0.1em;
}

.character-facts dd {
  margin: 5px 0 0;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.65;
}

.dual-links {
  display: flex;
  gap: 28px;
}

/* World */

.world-principles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  padding-block: 82px 110px;
}

.world-rule {
  min-height: 230px;
  padding: 12px 38px 32px;
  border-right: 1px solid var(--line);
}

.world-rule:first-child {
  padding-left: 0;
}

.world-rule:last-child {
  border-right: 0;
}

.world-rule > span {
  color: var(--gold);
  font-family: var(--display);
  font-size: 42px;
  font-style: italic;
}

.world-rule h2 {
  margin: 5px 0 10px;
  font-size: 27px;
  font-weight: 500;
}

.world-rule p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
}

.section-heading {
  margin-bottom: 32px;
}

.section-heading h2 {
  margin: 7px 0 0;
  font-size: 35px;
  font-weight: 500;
}

.color-route {
  margin-bottom: 130px;
}

.color-route-list {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 1px;
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--line);
}

.color-route-list li {
  position: relative;
  min-height: 180px;
  padding: 70px 13px 16px;
  overflow: hidden;
  background: var(--paper-light);
}

.color-route-list li::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 52px;
  content: "";
  background: var(--route-color);
  transition: height 260ms ease;
}

.color-route-list li:hover::before {
  height: 62px;
}

.color-route-list li.is-rainbow::before {
  background: linear-gradient(90deg, #745290, #344f87, #79c6d2, #4d7650, #d5ad4e, #c66b36, #9d3d38);
}

.color-route-list span {
  display: block;
  font-size: 16px;
  font-weight: 600;
}

.color-route-list small {
  display: block;
  margin-top: 8px;
  color: var(--ink-soft);
  font-size: 9px;
  line-height: 1.7;
}

.legacy-world {
  padding-bottom: 140px;
}

.heading-with-note {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 40px;
}

.heading-with-note > p {
  max-width: 440px;
  margin: 0 0 7px;
  color: var(--ink-soft);
  font-size: 12px;
}

.world-gallery {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  grid-template-rows: repeat(2, minmax(220px, 310px));
  gap: 12px;
}

.world-shot {
  position: relative;
  padding: 0;
  overflow: hidden;
  border: 0;
  color: white;
  cursor: zoom-in;
  background: var(--ink);
}

.world-shot:first-child {
  grid-row: span 2;
}

.world-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.9;
  transition:
    transform 600ms cubic-bezier(0.2, 0.7, 0.2, 1),
    opacity 220ms ease;
}

.world-shot:hover img {
  opacity: 1;
  transform: scale(1.035);
}

.world-shot::after {
  position: absolute;
  inset: 45% 0 0;
  content: "";
  background: linear-gradient(transparent, rgba(11, 19, 34, 0.72));
}

.world-shot span {
  position: absolute;
  z-index: 2;
  right: 18px;
  bottom: 13px;
  left: 18px;
  text-align: left;
  font-size: 12px;
  letter-spacing: 0.08em;
}

/* Story */

.synopsis {
  display: grid;
  grid-template-columns: 0.45fr repeat(3, 1fr);
  gap: 32px;
  margin-top: 92px;
  margin-bottom: 130px;
  padding: 40px 0;
  border-block: 1px solid var(--line-strong);
}

.synopsis-mark {
  margin: 0;
  color: var(--red);
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: 0.18em;
  writing-mode: vertical-rl;
}

.synopsis > p:not(.synopsis-mark) {
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 2.2;
}

.chapter-line {
  position: relative;
  margin-bottom: 140px;
  padding: 0;
  list-style: none;
}

.chapter-line::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 112px;
  width: 1px;
  content: "";
  background: linear-gradient(
    #7b838b,
    #c09359,
    #b76d3d,
    #516e82,
    #78a793,
    #a4473c
  );
}

.chapter {
  position: relative;
  display: grid;
  grid-template-columns: 112px 1fr minmax(320px, 0.85fr);
  align-items: center;
  gap: 50px;
  min-height: 270px;
  padding-block: 36px;
  border-bottom: 1px solid var(--line);
}

.chapter::before {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 105px;
  width: 15px;
  height: 15px;
  border: 4px solid var(--paper);
  border-radius: 50%;
  content: "";
  background: var(--chapter-color);
  transform: translateY(-50%);
}

.chapter-index {
  color: rgba(23, 36, 59, 0.46);
  font-family: var(--display);
  font-size: 10px;
  letter-spacing: 0.13em;
  writing-mode: vertical-rl;
}

.chapter-copy h2 {
  margin: 6px 0 12px;
  font-size: 35px;
  font-weight: 500;
}

.chapter-copy p:last-child {
  max-width: 520px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
}

.chapter-frame {
  position: relative;
  height: 190px;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  cursor: zoom-in;
  background: var(--ink);
  box-shadow: var(--shadow-small);
}

.chapter-frame::after {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: white;
  content: "↗";
  background: rgba(17, 29, 51, 0.76);
}

.chapter-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms ease;
}

.chapter-frame:hover img {
  transform: scale(1.035);
}

/* Materials */

.materials-intro {
  padding-bottom: 60px;
}

.material-shell {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 54px;
  padding-block: 60px 140px;
}

.material-tabs {
  position: sticky;
  top: calc(var(--header-height) + 28px);
  align-self: start;
  display: grid;
  border-top: 1px solid var(--line-strong);
}

.material-tabs button {
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 8px;
  min-height: 62px;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  cursor: pointer;
  text-align: left;
  background: transparent;
  font-size: 13px;
  transition:
    color 180ms ease,
    padding-left 180ms ease,
    background 180ms ease;
}

.material-tabs button span {
  color: rgba(23, 36, 59, 0.36);
  font-family: var(--display);
  font-size: 11px;
}

.material-tabs button:hover,
.material-tabs button.is-active {
  padding-left: 18px;
  color: var(--red-deep);
  background: rgba(251, 248, 241, 0.54);
}

.material-tabs button.is-active {
  box-shadow: inset 2px 0 var(--red);
}

.material-panel {
  min-width: 0;
}

.material-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 40px;
  margin-bottom: 34px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line-strong);
}

.material-panel-head h2 {
  margin: 7px 0 0;
  font-size: 34px;
  font-weight: 500;
}

.material-panel-head > p {
  max-width: 390px;
  margin: 0 0 4px;
  color: var(--ink-soft);
  font-size: 11px;
  text-align: right;
}

.style-method-note {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin-bottom: 20px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  background: rgba(251, 248, 241, 0.48);
}

.style-method-note p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 11px;
}

.style-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  gap: 7px;
}

.style-pill {
  display: inline-flex;
  width: fit-content;
  padding: 5px 8px 4px;
  border: 1px solid;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.25;
}

.style-pill-soft {
  border-color: rgba(174, 91, 78, 0.34);
  color: var(--red-deep);
  background: rgba(174, 91, 78, 0.08);
}

.style-pill-neutral {
  border-color: rgba(23, 36, 59, 0.26);
  color: var(--navy);
  background: rgba(23, 36, 59, 0.055);
}

.style-filters {
  margin-bottom: 38px;
}

.style-candidate-gallery {
  display: grid;
  gap: 64px;
}

.candidate-group {
  min-width: 0;
}

.candidate-group-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  margin-bottom: 17px;
}

.candidate-group-head h3 {
  margin: 5px 0 0;
  font-size: 27px;
  font-weight: 500;
}

.candidate-group-head h3 span {
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 400;
}

.candidate-group-head > p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 10px;
}

.candidate-grid {
  display: grid;
  gap: 14px;
}

.candidate-grid-six {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.candidate-grid-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 66.66%;
}

.candidate-card {
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  color: var(--ink);
  cursor: zoom-in;
  text-align: left;
  background: var(--paper-light);
  box-shadow: var(--shadow-small);
}

.candidate-image {
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--paper-deep);
}

.candidate-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms ease;
}

.candidate-card:hover .candidate-image img {
  transform: scale(1.018);
}

.candidate-meta {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 128px;
  padding: 13px 14px 14px;
  border-top: 1px solid var(--line);
}

.candidate-meta strong {
  font-size: 11px;
}

.candidate-meta small {
  color: var(--red-deep);
  font-size: 9px;
  line-height: 1.7;
}

.candidate-meta code {
  margin-top: auto;
  color: rgba(23, 36, 59, 0.42);
  font-family: var(--display);
  font-size: 8px;
  letter-spacing: 0.04em;
  overflow-wrap: anywhere;
}

.sheet-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.sheet-card {
  position: relative;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  color: var(--ink);
  cursor: zoom-in;
  text-align: left;
  background: var(--paper-light);
  box-shadow: var(--shadow-small);
}

.sheet-card:first-child {
  grid-column: span 2;
}

.sheet-card .sheet-image {
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--paper-deep);
}

.sheet-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms ease;
}

.sheet-card:hover img {
  transform: scale(1.018);
}

.sheet-meta {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 15px 17px;
  border-top: 1px solid var(--line);
}

.sheet-meta strong {
  font-size: 12px;
}

.sheet-meta span {
  color: rgba(23, 36, 59, 0.48);
  font-family: var(--display);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.storyboard-toolbar {
  display: grid;
  grid-template-columns: 1fr minmax(210px, 0.45fr) auto;
  align-items: end;
  gap: 20px;
  margin-bottom: 28px;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.filter-chips button {
  min-height: 38px;
  padding: 5px 15px;
  border: 1px solid var(--line-strong);
  color: var(--ink-soft);
  cursor: pointer;
  background: transparent;
  font-size: 11px;
}

.filter-chips button:hover,
.filter-chips button.is-active {
  color: white;
  background: var(--ink);
}

.board-search {
  display: grid;
  gap: 3px;
}

.board-search span {
  color: rgba(23, 36, 59, 0.56);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.board-search input {
  width: 100%;
  min-height: 38px;
  padding: 7px 11px;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  color: var(--ink);
  background: rgba(251, 248, 241, 0.5);
  font-size: 11px;
}

.board-count {
  margin: 0 0 3px;
  color: rgba(23, 36, 59, 0.48);
  font-family: var(--display);
  font-size: 11px;
  white-space: nowrap;
}

.board-count strong {
  color: var(--red);
  font-size: 18px;
}

.storyboard-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
}

.board-card {
  position: relative;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  color: white;
  cursor: zoom-in;
  background: var(--ink);
}

.board-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  opacity: 0.9;
  transition:
    opacity 180ms ease,
    transform 400ms ease;
}

.board-card:hover img {
  opacity: 1;
  transform: scale(1.025);
}

.board-card-meta {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 26px 10px 8px;
  background: linear-gradient(transparent, rgba(12, 20, 35, 0.88));
}

.board-card-meta strong {
  font-family: var(--display);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.06em;
}

.board-card-meta span {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.7);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.load-more {
  width: 100%;
  margin-top: 24px;
}

.decision-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.decision-card {
  min-height: 200px;
  padding: 26px;
  border: 1px solid var(--line);
  background: rgba(251, 248, 241, 0.62);
}

.decision-state {
  display: inline-flex;
  min-width: 54px;
  justify-content: center;
  padding: 3px 8px;
  border: 1px solid currentColor;
  font-size: 9px;
  letter-spacing: 0.1em;
}

.state-fixed {
  color: var(--sage);
}

.state-current {
  color: var(--navy);
}

.state-open {
  color: var(--red);
}

.decision-card h3 {
  margin: 18px 0 8px;
  font-size: 22px;
  font-weight: 500;
}

.decision-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.9;
}

.motif-ledger {
  margin-top: 66px;
  padding: 34px;
  border: 1px solid var(--line-strong);
  background: var(--navy-deep);
  color: var(--paper-light);
}

.motif-ledger .section-kicker {
  color: var(--gold-light);
}

.motif-ledger .section-heading h2 {
  color: white;
}

.motif-ledger ul {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0 34px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.motif-ledger li {
  padding: 16px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.7);
  font-size: 11px;
}

.motif-ledger li strong {
  color: white;
}

.review-guide {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
}

.review-guide > ol {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.review-guide > ol li {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 15px;
  padding: 24px;
  border: 1px solid var(--line);
  background: rgba(251, 248, 241, 0.54);
}

.review-guide > ol li > span {
  color: var(--gold);
  font-family: var(--display);
  font-size: 34px;
  font-style: italic;
  line-height: 1;
}

.review-guide strong {
  font-size: 15px;
}

.review-guide p {
  margin: 4px 0 0;
  color: var(--ink-soft);
  font-size: 11px;
}

.review-note {
  align-self: stretch;
  padding: 32px;
  color: var(--paper-light);
  background: var(--navy-deep);
}

.review-note .section-kicker {
  color: var(--gold-light);
}

.review-note > strong {
  display: block;
  margin: 20px 0 10px;
  font-size: 24px;
  font-weight: 500;
}

.review-note p {
  color: rgba(255, 255, 255, 0.68);
}

.review-note .button {
  width: 100%;
  margin-top: 30px;
  border-color: var(--paper-light);
  color: var(--navy-deep);
  background: var(--paper-light);
  box-shadow: 6px 6px 0 rgba(189, 150, 85, 0.36);
}

/* Footer */

.site-footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 30px;
  min-height: 150px;
  padding: 32px 50px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.64);
  background: var(--navy-deep);
  font-size: 10px;
}

.site-footer > div {
  display: flex;
  align-items: baseline;
  gap: 14px;
  font-family: var(--display);
  letter-spacing: 0.12em;
}

.footer-title {
  color: white;
  font-size: 28px;
  font-style: italic;
  letter-spacing: -0.02em;
}

.site-footer > p {
  margin: 0;
  text-align: center;
}

.deerflow-signature {
  justify-self: end;
  color: rgba(255, 255, 255, 0.45);
  font-family: var(--display);
  letter-spacing: 0.12em;
  text-decoration: none;
  transition: color 180ms ease;
}

.deerflow-signature:hover {
  color: var(--gold-light);
}

/* Dialog and feedback */

.media-dialog {
  width: min(1460px, calc(100vw - 42px));
  max-width: none;
  height: min(900px, calc(100vh - 42px));
  max-height: none;
  padding: 0;
  overflow: hidden;
  border: 0;
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 30px 100px rgba(5, 10, 18, 0.45);
}

.media-dialog::backdrop {
  background: rgba(8, 14, 26, 0.83);
  backdrop-filter: blur(9px);
}

.media-dialog[open] {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
}

.dialog-close {
  position: absolute;
  z-index: 5;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(23, 36, 59, 0.24);
  color: var(--ink);
  cursor: pointer;
  background: rgba(243, 238, 228, 0.9);
  font-family: var(--display);
  font-size: 25px;
  line-height: 1;
}

.dialog-media {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
  padding: 26px;
  overflow: auto;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.04), transparent 50%),
    var(--navy-deep);
}

.dialog-media img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  box-shadow: 0 12px 38px rgba(0, 0, 0, 0.28);
}

.dialog-sidebar {
  display: flex;
  flex-direction: column;
  padding: 42px 28px 28px;
  overflow: auto;
  border-left: 1px solid var(--line);
}

.dialog-sidebar h2 {
  margin: 8px 0 10px;
  font-size: 24px;
  font-weight: 500;
  line-height: 1.55;
}

.dialog-id {
  margin: 0 0 24px;
  color: var(--ink-soft);
  font-family: var(--display);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.dialog-id code {
  color: var(--red-deep);
  font-family: var(--display);
}

.review-choice {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin: 0 0 22px;
  padding: 0;
  border: 0;
}

.review-choice legend,
.review-comment > span {
  grid-column: 1 / -1;
  margin-bottom: 7px;
  color: rgba(23, 36, 59, 0.55);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.review-choice label {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 42px;
  padding: 5px;
  border: 1px solid var(--line-strong);
  cursor: pointer;
  font-size: 10px;
}

.review-choice label:has(input:checked) {
  color: white;
  background: var(--ink);
}

.review-choice input {
  position: absolute;
  opacity: 0;
}

.review-comment {
  display: grid;
}

.review-comment textarea {
  width: 100%;
  resize: vertical;
  padding: 12px;
  border: 1px solid var(--line-strong);
  color: var(--ink);
  background: var(--paper-light);
  font-size: 12px;
  line-height: 1.8;
}

.dialog-actions {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 8px;
  margin-top: 16px;
}

.dialog-actions .button {
  min-height: 43px;
  padding-inline: 10px;
  font-size: 10px;
}

.dialog-toast {
  min-height: 24px;
  margin: 12px 0 0;
  color: var(--sage);
  font-size: 10px;
}

/* Reveal */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 600ms ease,
    transform 600ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Responsive */

@media (max-width: 1120px) {
  :root {
    --content: min(100% - 48px, 980px);
  }

  .site-header {
    grid-template-columns: 1fr auto;
    padding-inline: 24px;
  }

  .header-status {
    display: none;
  }

  .hero {
    grid-template-columns: 0.9fr 1.1fr;
  }

  .hero-copy {
    padding-left: 40px;
  }

  .hero-title {
    font-size: clamp(80px, 11vw, 130px);
  }

  .music-card {
    grid-template-columns: 180px 1fr;
  }

  .music-vinyl {
    width: 160px;
  }

  .color-route-list {
    grid-template-columns: repeat(5, 1fr);
  }

  .world-gallery {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: repeat(3, minmax(220px, 280px));
  }

  .world-shot:first-child {
    grid-row: auto;
  }

  .material-shell {
    grid-template-columns: 210px minmax(0, 1fr);
    gap: 32px;
  }

  .storyboard-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  :root {
    --header-height: 118px;
    --content: calc(100% - 32px);
  }

  .site-header {
    position: sticky;
    grid-template-columns: 1fr;
    gap: 5px;
    min-height: var(--header-height);
    padding: 12px 16px 0;
  }

  .wordmark {
    justify-self: center;
  }

  .wordmark-sub {
    display: none;
  }

  .primary-nav {
    justify-content: center;
    width: 100%;
    height: 58px;
    overflow-x: auto;
  }

  .primary-nav a {
    min-width: auto;
    padding-inline: 13px;
    font-size: 12px;
    white-space: nowrap;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero-copy {
    padding: 68px 24px 40px;
  }

  .hero-copy br {
    display: none;
  }

  .hero-title {
    font-size: clamp(84px, 26vw, 130px);
  }

  .hero-title-jp {
    margin-top: 36px;
    font-size: clamp(27px, 8vw, 42px);
  }

  .hero-art {
    min-height: 660px;
  }

  .hero-irisia {
    top: 12px;
    right: 11%;
    width: auto;
    height: calc(100% - 18px);
  }

  .palette-orbit {
    right: 7%;
  }

  .home-grid {
    grid-template-columns: 1fr;
  }

  .manifesto {
    grid-template-columns: 70px 1fr;
  }

  .manifesto > p {
    grid-column: 1 / -1;
  }

  .canon-cards {
    grid-template-columns: 1fr;
  }

  .page-intro {
    grid-template-columns: 1fr;
    gap: 36px;
    padding-top: 70px;
  }

  .page-intro .eyebrow {
    margin-bottom: -20px;
  }

  .character-feature,
  .character-feature-reverse {
    grid-template-columns: 1fr;
    gap: 38px;
  }

  .character-feature-reverse .character-portrait,
  .character-feature-reverse .character-copy {
    order: initial;
  }

  .character-portrait {
    height: min(720px, 110vw);
  }

  .world-principles {
    grid-template-columns: 1fr;
  }

  .world-rule,
  .world-rule:first-child {
    min-height: auto;
    padding: 28px 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .synopsis {
    grid-template-columns: 30px 1fr;
  }

  .synopsis > p:not(.synopsis-mark) {
    grid-column: 2;
  }

  .synopsis-mark {
    grid-row: 1 / 4;
  }

  .chapter-line::before {
    left: 20px;
  }

  .chapter {
    grid-template-columns: 42px 1fr;
    gap: 22px;
    padding-block: 42px;
  }

  .chapter::before {
    left: 13px;
  }

  .chapter-frame {
    grid-column: 2;
    width: 100%;
  }

  .material-shell {
    grid-template-columns: 1fr;
  }

  .material-tabs {
    position: static;
    grid-template-columns: repeat(5, minmax(110px, 1fr));
    overflow-x: auto;
    border-top: 0;
  }

  .material-tabs button {
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 8px;
    border: 1px solid var(--line);
    font-size: 11px;
    text-align: center;
    white-space: nowrap;
  }

  .material-tabs button:hover,
  .material-tabs button.is-active {
    padding-left: 8px;
    box-shadow: inset 0 -2px var(--red);
  }

  .material-panel-head {
    align-items: start;
    flex-direction: column;
  }

  .material-panel-head > p {
    text-align: left;
  }

  .style-method-note {
    align-items: start;
    flex-direction: column;
  }

  .style-legend {
    justify-content: start;
  }

  .review-guide {
    grid-template-columns: 1fr;
  }

  .media-dialog[open] {
    grid-template-columns: 1fr;
    height: calc(100vh - 20px);
  }

  .dialog-media {
    min-height: 48vh;
  }

  .dialog-sidebar {
    min-height: 0;
    padding: 24px;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .site-footer {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .deerflow-signature {
    justify-self: center;
  }
}

@media (max-width: 560px) {
  .hero-actions,
  .dual-links {
    flex-direction: column;
    align-items: stretch;
  }

  .music-card {
    grid-template-columns: 1fr;
  }

  .music-vinyl {
    width: 150px;
    margin-inline: auto;
  }

  .manifesto {
    grid-template-columns: 1fr;
  }

  .manifesto-number {
    font-size: 50px;
  }

  .character-facts {
    grid-template-columns: 1fr;
  }

  .color-route-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .world-gallery {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(6, 230px);
  }

  .heading-with-note {
    align-items: start;
    flex-direction: column;
  }

  .sheet-gallery,
  .candidate-grid-six,
  .candidate-grid-two,
  .decision-grid,
  .motif-ledger ul {
    grid-template-columns: 1fr;
  }

  .candidate-grid-two {
    max-width: none;
  }

  .candidate-group-head {
    align-items: start;
    flex-direction: column;
  }

  .sheet-card:first-child {
    grid-column: auto;
  }

  .storyboard-toolbar {
    grid-template-columns: 1fr;
  }

  .storyboard-gallery {
    grid-template-columns: 1fr;
  }

  .material-tabs {
    grid-template-columns: repeat(5, 130px);
  }

  .site-footer > div {
    flex-direction: column;
    gap: 3px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
