:root {
  --ink: #17212b;
  --muted: #5b6570;
  --paper: #fffaf2;
  --white: #ffffff;
  --sky: #86d7e5;
  --aqua: #1ba8c7;
  --leaf: #4f8c5d;
  --sun: #f4c94a;
  --coral: #e85d5f;
  --plum: #5d456c;
  --line: rgba(23, 33, 43, 0.13);
  --shadow: 0 18px 55px rgba(23, 33, 43, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

[id] {
  scroll-margin-top: 88px;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family:
    "Yu Gothic", "YuGothic", "Hiragino Kaku Gothic ProN", Meiryo, Arial,
    sans-serif;
  letter-spacing: 0;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  height: 72px;
  padding: 12px 32px;
  color: var(--white);
  background: rgba(23, 33, 43, 0.18);
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  transition:
    background 220ms ease,
    color 220ms ease,
    box-shadow 220ms ease;
}

.site-header.scrolled {
  color: var(--ink);
  background: rgba(255, 250, 242, 0.94);
  box-shadow: 0 8px 24px rgba(23, 33, 43, 0.08);
}

.brand {
  display: flex;
  align-items: center;
  width: 232px;
}

.brand img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 2px 0 rgba(255, 255, 255, 0.7));
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-nav a {
  min-width: 84px;
  padding: 10px 12px;
  border-radius: 999px;
  text-align: center;
  font-size: 0.92rem;
  font-weight: 700;
  transition:
    background 180ms ease,
    color 180ms ease;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--ink);
  background: var(--sun);
}

.language-switch {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  background: rgba(23, 33, 43, 0.2);
}

.site-header.scrolled .language-switch {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.7);
}

.language-switch button {
  min-width: 42px;
  min-height: 32px;
  padding: 6px 9px;
  color: inherit;
  border: 0;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 900;
}

.language-switch button:hover,
.language-switch button.active {
  color: var(--ink);
  background: var(--sun);
}

.hero {
  position: relative;
  min-height: 82svh;
  max-height: 780px;
  overflow: hidden;
  isolation: isolate;
  display: grid;
  align-items: end;
  padding: 120px 32px 64px;
}

.hero-carousel,
.hero-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-carousel {
  z-index: -2;
  overflow: hidden;
  background: var(--ink);
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  transform: scale(1.04) translate3d(var(--hero-x, 0), var(--hero-y, 0), 0);
  transition:
    opacity 900ms ease,
    transform 160ms ease-out;
}

.hero-bg.active {
  opacity: 1;
}

.hero-bg.contain {
  padding: min(7vw, 88px);
  object-fit: contain;
  background:
    linear-gradient(135deg, rgba(134, 215, 229, 0.34), rgba(244, 201, 74, 0.25)),
    var(--paper);
}

.hero-shade {
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(15, 25, 32, 0.76), rgba(15, 25, 32, 0.2) 58%),
    linear-gradient(0deg, rgba(15, 25, 32, 0.38), rgba(15, 25, 32, 0.02));
}

.hero-content {
  width: min(760px, 100%);
  color: var(--white);
}

.eyebrow,
.card-kicker {
  margin: 0 0 10px;
  color: var(--aqua);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

.hero .eyebrow {
  color: var(--sun);
}

.hero h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 4.8rem;
  line-height: 0.96;
  letter-spacing: 0;
}

.hero-copy {
  width: min(600px, 100%);
  margin: 22px 0 0;
  font-size: 1.1rem;
  line-height: 1.9;
  color: rgba(255, 255, 255, 0.94);
}

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

.hero-controls {
  position: absolute;
  right: 32px;
  bottom: 28px;
  z-index: 2;
  display: flex;
  gap: 8px;
}

.hero-controls button {
  width: 42px;
  height: 42px;
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  background: rgba(23, 33, 43, 0.48);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 900;
  transition:
    background 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.hero-controls button:hover,
.hero-controls button.active {
  color: var(--ink);
  background: var(--sun);
  transform: translateY(-1px);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 148px;
  min-height: 46px;
  padding: 12px 18px;
  border: 2px solid transparent;
  border-radius: 6px;
  font-weight: 800;
  transition:
    transform 180ms ease,
    background 180ms ease,
    color 180ms ease,
    border-color 180ms ease;
}

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

.button.primary {
  color: var(--ink);
  background: var(--sun);
}

.button.ghost {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.08);
}

.signal-band {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border-bottom: 1px solid var(--line);
}

.signal-item {
  min-height: 116px;
  padding: 28px 32px;
  background: var(--white);
}

.signal-item strong,
.signal-item span {
  display: block;
}

.signal-item strong {
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.signal-item span {
  color: var(--muted);
  line-height: 1.65;
}

.section,
.world-section,
.learning-section,
.process-section,
.closing-section {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 92px 0;
}

.section-heading {
  width: min(720px, 100%);
  margin-bottom: 36px;
}

.section-heading.compact {
  margin-bottom: 22px;
}

.section-heading h2,
.world-copy h2,
.learning-copy h2,
.character-copy h2,
.gallery-head h2,
.closing-section h2 {
  margin: 0;
  font-size: 2.45rem;
  line-height: 1.18;
  letter-spacing: 0;
}

.section-heading p,
.world-copy p,
.learning-copy p,
.character-copy p,
.closing-section p {
  color: var(--muted);
  line-height: 1.9;
}

.about-section {
  padding-bottom: 48px;
}

.about-section .section-heading {
  width: min(1120px, 100%);
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.about-card {
  min-height: 208px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 10px 26px rgba(23, 33, 43, 0.07);
}

.about-card span {
  display: inline-flex;
  min-width: 74px;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  padding: 8px 10px;
  color: var(--ink);
  background: var(--sun);
  border-radius: 6px;
  font-weight: 900;
}

.about-card h3 {
  margin: 0 0 10px;
  font-size: 1.18rem;
}

.about-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.app-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: -10px 0 28px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(134, 215, 229, 0.18), rgba(244, 201, 74, 0.16)),
    var(--white);
  box-shadow: 0 10px 26px rgba(23, 33, 43, 0.06);
}

.app-cta strong,
.app-cta span {
  display: block;
}

.app-cta strong {
  margin-bottom: 4px;
  font-size: 1.02rem;
}

.app-cta span {
  color: var(--muted);
  line-height: 1.65;
}

.app-cta .button {
  flex: 0 0 auto;
}

.hero-options {
  padding-top: 36px;
}

.hero-option-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.hero-option {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 10px 26px rgba(23, 33, 43, 0.07);
}

.hero-option.current {
  border-color: rgba(27, 168, 199, 0.52);
}

.hero-option img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.hero-option div {
  padding: 18px;
}

.hero-option h3 {
  margin: 0;
  font-size: 1.12rem;
}

.hero-option p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.7;
}

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

.work-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 10px 28px rgba(23, 33, 43, 0.08);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease;
}

.work-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.work-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.work-card div {
  padding: 20px;
}

.work-card h3 {
  margin: 0;
  font-size: 1.3rem;
}

.work-card p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.75;
}

.world-section {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 32px;
  align-items: center;
}

.learning-section {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(320px, 1.1fr);
  gap: 36px;
  align-items: center;
  padding-top: 42px;
}

.learning-points {
  display: grid;
  gap: 12px;
  padding: 0;
  margin: 24px 0 0;
  list-style: none;
}

.learning-points li {
  position: relative;
  padding-left: 28px;
  color: var(--muted);
  line-height: 1.75;
}

.learning-points li::before {
  position: absolute;
  top: 0.72em;
  left: 0;
  width: 10px;
  height: 10px;
  content: "";
  background: var(--coral);
  border-radius: 50%;
  box-shadow: 12px 0 0 var(--sun);
}

.learning-visual {
  position: relative;
  overflow: hidden;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.learning-visual img {
  width: 100%;
  max-height: 680px;
  object-fit: cover;
  object-position: top center;
}

.learning-visual figcaption {
  position: absolute;
  left: 14px;
  bottom: 14px;
  padding: 8px 11px;
  color: var(--white);
  background: rgba(23, 33, 43, 0.82);
  border-radius: 6px;
  font-size: 0.86rem;
  font-weight: 900;
}

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

.world-panel {
  position: relative;
  overflow: hidden;
  min-height: 190px;
  margin: 0;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--ink);
}

.world-panel img {
  width: 100%;
  height: 100%;
  min-height: 190px;
  object-fit: cover;
  transition: transform 450ms ease;
}

.world-panel:hover img {
  transform: scale(1.04);
}

.world-panel figcaption {
  position: absolute;
  left: 16px;
  bottom: 16px;
  padding: 8px 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.86);
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 800;
}

.world-panel.dark figcaption {
  color: var(--white);
  background: rgba(23, 33, 43, 0.8);
}

.character-section {
  padding-top: 42px;
}

.character-stage {
  display: grid;
  grid-template-columns: minmax(280px, 0.92fr) minmax(300px, 1.08fr);
  gap: 36px;
  align-items: center;
  padding: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(134, 215, 229, 0.24), rgba(244, 201, 74, 0.24)),
    var(--white);
}

.character-visual {
  display: grid;
  place-items: center;
  min-height: 470px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(23, 33, 43, 0.08);
  border-radius: 8px;
}

.character-visual img {
  width: min(680px, 96%);
  max-height: 540px;
  object-fit: contain;
  transition:
    opacity 180ms ease,
    transform 220ms ease;
}

.character-visual img.switching {
  opacity: 0;
  transform: translateY(8px);
}

.character-copy p[data-character-text] {
  min-height: 104px;
  margin-bottom: 24px;
  font-size: 1.04rem;
}

.character-tabs,
.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.character-variants {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 16px;
}

.character-variants[hidden] {
  display: none;
}

.character-variants button {
  width: 56px;
  height: 56px;
  overflow: hidden;
  padding: 3px;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: var(--white);
  cursor: pointer;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.character-variants button:hover,
.character-variants button.active {
  border-color: var(--sun);
  box-shadow: 0 0 0 3px rgba(244, 201, 74, 0.25);
  transform: translateY(-1px);
}

.character-variants img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.tab,
.filter {
  min-width: 92px;
  min-height: 40px;
  padding: 9px 14px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  cursor: pointer;
  font-weight: 800;
  transition:
    color 180ms ease,
    background 180ms ease,
    border-color 180ms ease,
    transform 180ms ease;
}

.tab:hover,
.filter:hover {
  transform: translateY(-1px);
  border-color: var(--aqua);
}

.tab.active,
.filter.active {
  color: var(--white);
  background: var(--ink);
  border-color: var(--ink);
}

.process-section {
  padding-top: 36px;
  padding-bottom: 42px;
}

.process-section .section-heading {
  width: min(1180px, 100%);
}

.process-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.process-list li {
  min-height: 190px;
  padding: 22px;
  border-top: 4px solid var(--coral);
  background: var(--white);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(23, 33, 43, 0.07);
}

.process-list li:nth-child(2) {
  border-color: var(--aqua);
}

.process-list li:nth-child(3) {
  border-color: var(--leaf);
}

.process-list span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-bottom: 18px;
  color: var(--white);
  background: var(--ink);
  border-radius: 50%;
  font-weight: 900;
}

.process-list strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1.15rem;
}

.process-list p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.gallery-section {
  padding-top: 34px;
}

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

.gallery-grid {
  display: grid;
  grid-auto-flow: dense;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.archive-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin: 42px 0 16px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.archive-heading h3 {
  margin: 0;
  font-size: 1.65rem;
}

.archive-heading p:last-child {
  max-width: 460px;
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.monster-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 10px;
}

.monster-more {
  display: none;
}

.comic-grid {
  display: block;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  min-height: 220px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: var(--ink);
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(23, 33, 43, 0.1);
}

.gallery-item.wide {
  grid-column: span 2;
}

.gallery-item.tall {
  grid-row: span 2;
}

.monster-item {
  min-height: 144px;
}

.monster-item img {
  min-height: 144px;
}

.comic-episode {
  min-height: 520px;
}

.comic-episode img {
  min-height: 520px;
  object-position: top center;
}

.comic-viewer {
  display: grid;
  width: min(860px, 100%);
  gap: 12px;
}

.comic-frame {
  position: relative;
  overflow: hidden;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 10px 26px rgba(23, 33, 43, 0.1);
}

.comic-frame img {
  width: 100%;
  max-height: 76svh;
  object-fit: contain;
  background: var(--white);
}

.comic-frame figcaption {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 8px 11px;
  color: var(--ink);
  background: rgba(255, 250, 242, 0.92);
  border-radius: 6px;
  font-size: 0.86rem;
  font-weight: 900;
}

.comic-controls {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 10px 26px rgba(23, 33, 43, 0.07);
}

.comic-controls button {
  min-width: 136px;
  min-height: 42px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  cursor: pointer;
  font-weight: 900;
}

.comic-controls button[hidden] {
  display: none;
}

.comic-controls span {
  min-width: 76px;
  text-align: center;
  color: var(--muted);
  font-weight: 900;
}

@media (min-width: 901px) {
  .process-section .section-heading h2 {
    white-space: nowrap;
  }
}


.comic-selector {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.comic-dot {
  min-height: 38px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 900;
}

.comic-dot.active {
  color: var(--ink);
  background: var(--sun);
  border-color: var(--sun);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
  opacity: 0.96;
  transition:
    opacity 180ms ease,
    transform 360ms ease;
}

.gallery-item[data-kind="character"] img {
  object-fit: contain;
  background: rgba(255, 255, 255, 0.88);
}

.gallery-item:hover img {
  opacity: 1;
  transform: scale(1.04);
}

.gallery-item.victor-card img {
  transform: scale(1.16);
}

.gallery-item.victor-card:hover img {
  transform: scale(1.22);
}

.gallery-item > span {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 8px 11px;
  color: var(--ink);
  background: rgba(255, 250, 242, 0.9);
  border-radius: 6px;
  font-size: 0.86rem;
  font-weight: 900;
}

.missing-image {
  cursor: default;
  background:
    repeating-linear-gradient(
      -45deg,
      rgba(255, 250, 242, 0.12) 0 10px,
      rgba(255, 250, 242, 0.04) 10px 20px
    ),
    var(--ink);
}

.missing-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 144px;
  color: rgba(255, 250, 242, 0.72);
  border: 1px dashed rgba(255, 250, 242, 0.38);
  font-size: 0.82rem;
  font-weight: 900;
}

.variant-button {
  position: absolute;
  right: 9px;
  top: 9px;
  width: 24px;
  height: 24px;
  padding: 0;
  color: transparent;
  border: 2px solid rgba(255, 255, 255, 0.86);
  border-radius: 50%;
  background:
    conic-gradient(from 20deg, #e85d5f, #f4c94a, #1ba8c7, #5d456c, #e85d5f);
  box-shadow: 0 4px 12px rgba(23, 33, 43, 0.28);
  cursor: pointer;
  transition:
    box-shadow 180ms ease,
    transform 180ms ease;
}

.variant-button:hover {
  box-shadow: 0 5px 14px rgba(23, 33, 43, 0.34);
  transform: translateY(-1px) scale(1.05);
}

.gallery-item.hidden {
  display: none;
}

.closing-section {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 32px;
  align-items: center;
  padding-top: 42px;
  padding-bottom: 104px;
}

.closing-logo {
  width: min(420px, 100%);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(134, 215, 229, 0.2), rgba(244, 201, 74, 0.2)),
    var(--white);
  box-shadow: 0 10px 28px rgba(23, 33, 43, 0.08);
}

.source-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.related-works {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.related-card {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-height: 132px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.related-card img {
  width: 88px;
  aspect-ratio: 1;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  object-fit: contain;
}

.related-card h3 {
  margin: 0 0 6px;
  font-size: 1rem;
  line-height: 1.35;
}

.related-card p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.65;
}

.related-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
}

.text-link {
  color: var(--aqua);
  font-weight: 900;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.button.outline {
  color: var(--ink);
  border-color: var(--ink);
  background: transparent;
}

.lightbox {
  width: min(980px, calc(100% - 28px));
  max-height: calc(100svh - 36px);
  padding: 18px;
  border: 0;
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.lightbox::backdrop {
  background: rgba(23, 33, 43, 0.72);
}

.lightbox img {
  width: 100%;
  max-height: calc(100svh - 100px);
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  color: var(--white);
  border: 0;
  border-radius: 50%;
  background: var(--ink);
  cursor: pointer;
  font-weight: 900;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 420ms ease,
    transform 420ms ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}

@media (max-width: 900px) {
  .site-header {
    height: auto;
    min-height: 68px;
    padding: 10px 18px;
  }

  .brand {
    width: 160px;
  }

  .site-nav {
    gap: 2px;
  }

  .site-nav a {
    min-width: auto;
    padding: 8px 9px;
    font-size: 0.82rem;
  }

  .language-switch button {
    min-width: 38px;
  }

  .hero {
    min-height: 78svh;
    padding: 110px 22px 52px;
  }

  .hero-controls {
    right: 22px;
    bottom: 20px;
  }

  .hero h1 {
    font-size: 3.3rem;
  }

  .signal-band,
  .about-grid,
  .hero-option-grid,
  .work-grid,
  .world-section,
  .learning-section,
  .character-stage,
  .process-list,
  .closing-section {
    grid-template-columns: 1fr;
  }

  .section,
  .world-section,
  .learning-section,
  .process-section,
  .closing-section {
    width: min(100% - 32px, 720px);
    padding: 72px 0;
  }

  .section-heading h2,
  .world-copy h2,
  .learning-copy h2,
  .character-copy h2,
  .gallery-head h2,
  .closing-section h2 {
    font-size: 2rem;
  }

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

  .app-cta {
    align-items: flex-start;
    flex-direction: column;
  }

  .app-cta .button {
    width: 100%;
  }

  .closing-logo {
    width: min(300px, 100%);
  }

  .related-works {
    grid-template-columns: 1fr;
  }

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

  .comic-viewer {
    grid-template-columns: 1fr;
  }

  .monster-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

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

  .gallery-item.wide,
  .gallery-item.tall {
    grid-column: auto;
    grid-row: auto;
  }
}

@media (max-width: 560px) {
  .site-header {
    position: absolute;
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .language-switch {
    position: absolute;
    top: 12px;
    right: 18px;
  }

  .site-nav {
    width: 100%;
    justify-content: space-between;
    margin-top: 8px;
  }

  .brand {
    width: 178px;
  }

  .site-nav a {
    padding: 7px 6px;
    font-size: 0.78rem;
  }

  .hero {
    min-height: 76svh;
    padding: 132px 18px 42px;
  }

  .hero-bg.contain {
    padding: 86px 18px 42px;
  }

  .hero-controls {
    right: auto;
    bottom: 16px;
    left: 18px;
  }

  .hero-controls button {
    width: 38px;
    height: 38px;
  }

  .hero h1 {
    font-size: 2.65rem;
  }

  .hero-copy {
    font-size: 1rem;
    line-height: 1.75;
  }

  .about-section .section-heading h2 {
    font-size: 1.72rem;
    line-height: 1.28;
  }

  .hero-actions {
    margin-bottom: 58px;
  }

  .button {
    flex: 1 1 100%;
  }

  .signal-item {
    min-height: 92px;
    padding: 20px 22px;
  }

  .related-card {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
  }

  .related-card img {
    width: 72px;
  }

  .character-stage {
    padding: 18px;
  }

  .character-visual {
    min-height: 320px;
  }

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

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

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

  .monster-grid:not(.expanded) .monster-item:nth-child(n+11) {
    display: none;
  }

  .monster-more {
    display: inline-flex;
    width: 100%;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    margin: 14px 0 6px;
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--sun);
    cursor: pointer;
    font-weight: 900;
  }

  .monster-more[hidden] {
    display: none;
  }

  .comic-grid {
    grid-template-columns: 1fr;
    width: calc(100vw - 16px);
    margin-left: 50%;
    transform: translateX(-50%);
  }

  .comic-viewer {
    width: 100%;
  }

  .comic-frame {
    border-radius: 6px;
    box-shadow: 0 8px 18px rgba(23, 33, 43, 0.08);
  }

  .comic-frame img {
    height: auto;
    max-height: none;
  }

  .comic-frame figcaption {
    left: 8px;
    bottom: 8px;
  }

  .comic-controls {
    justify-content: space-between;
    gap: 8px;
    padding: 10px;
  }

  .comic-controls button {
    flex: 0 0 auto;
    min-width: 92px;
    min-height: 44px;
    padding: 8px 12px;
  }

  .comic-controls span {
    flex: 1 1 auto;
    min-width: 0;
  }

  .comic-selector {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-top: 8px;
  }

  .comic-dot {
    min-height: 40px;
    font-size: 0.82rem;
  }

  .gallery-item {
    min-height: 260px;
  }

  .monster-item,
  .monster-item img {
    min-height: 156px;
  }

  .comic-episode,
  .comic-episode img {
    min-height: 560px;
  }
}
