:root {
  --cream: #ffedd7;
  --ink: #100904;
  --ember: #e95a16;
  --line: rgba(255, 237, 215, 0.28);
  --ease: cubic-bezier(0.72, 0, 0.18, 1);
  --header-height: 68px;
}

* { box-sizing: border-box; }
html { background: var(--ink); scroll-behavior: smooth; }
body {
  background: var(--ink);
  color: var(--cream);
  font-family: Inter, "Noto Sans SC", "Microsoft YaHei", sans-serif;
  margin: 0;
}
button, a { font: inherit; }
button { color: inherit; }
a { color: inherit; }
button, [data-page], [data-next], [data-prev] { -webkit-tap-highlight-color: transparent; }

.skip-link {
  background: var(--cream);
  color: var(--ink);
  left: 18px;
  padding: 10px 14px;
  position: fixed;
  top: -80px;
  z-index: 100;
}
.skip-link:focus { top: 12px; }
.sr-only {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.navigation {
  align-items: center;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  height: calc(var(--header-height) + env(safe-area-inset-top));
  inset: 0 0 auto;
  padding: env(safe-area-inset-top) max(22px, env(safe-area-inset-right)) 0 max(22px, env(safe-area-inset-left));
  position: fixed;
  z-index: 50;
}
.navigation::after {
  background: linear-gradient(180deg, rgba(16, 9, 4, 0.54), transparent);
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
  z-index: -1;
}
.brand {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-decoration: none;
}
.page-nav { display: flex; gap: clamp(14px, 2.5vw, 34px); }
.page-nav a {
  color: rgba(255, 237, 215, 0.58);
  font-size: 11px;
  padding: 8px 0;
  position: relative;
  text-decoration: none;
  transition: color 180ms ease;
}
.page-nav a::after {
  background: currentColor;
  bottom: 2px;
  content: "";
  height: 1px;
  left: 0;
  position: absolute;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 220ms ease;
  width: 100%;
}
.page-nav a:hover, .page-nav a.is-active { color: var(--cream); }
.page-nav a.is-active::after { transform: scaleX(1); }
.header-next {
  align-items: center;
  background: transparent;
  border: 0;
  cursor: pointer;
  display: flex;
  font-size: 11px;
  gap: 10px;
  justify-self: end;
  padding: 9px 0 9px 12px;
}
.header-next b { font-size: 15px; font-weight: 400; }

.deck { background: var(--ink); }
.panel {
  background: #17100b;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  min-height: 100svh;
  overflow: hidden;
  position: relative;
}
.panel-scroll {
  min-height: 100svh;
  position: relative;
  scrollbar-width: none;
}
.panel-scroll::-webkit-scrollbar { display: none; }

.deck-ready, .deck-ready body { height: 100%; overflow: hidden; }
.deck-ready body { overscroll-behavior: none; }
.deck-ready .deck {
  height: 100dvh;
  inset: 0;
  overflow: hidden;
  perspective: 1400px;
  position: fixed;
  touch-action: pan-x pinch-zoom;
}
.deck-ready .panel {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.48);
  inset: calc(var(--header-height) + env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
  min-height: 0;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  transform: translate3d(0, 112%, 0) scale(0.94);
  transition: transform 680ms var(--ease), opacity 420ms ease, filter 680ms var(--ease);
  will-change: transform, opacity;
}
.deck-ready .panel-scroll {
  height: 100%;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.deck-ready .panel.is-active {
  filter: brightness(1);
  opacity: 1;
  pointer-events: auto;
  transform: translate3d(0, 0, 0) scale(1);
  z-index: 5;
}
.deck-ready .panel.is-prev {
  filter: brightness(0.52);
  opacity: 0.58;
  transform: translate3d(0, calc(-100% + 13px), 0) scale(0.975);
  z-index: 4;
}
.deck-ready .panel.is-next {
  filter: brightness(0.52);
  opacity: 0.58;
  transform: translate3d(0, calc(100% - 13px), 0) scale(0.975);
  z-index: 4;
}
.deck-ready .panel.is-before {
  transform: translate3d(0, -112%, 0) scale(0.94);
  z-index: 1;
}
.deck-ready .panel.is-after { z-index: 1; }

.eyebrow {
  font-size: 11px;
  letter-spacing: 0.08em;
  margin: 0;
  text-transform: uppercase;
}
.panel h1, .panel h2 { letter-spacing: -0.055em; }

.panel-hero { background: #75bce0; }
.hero-video, .hero-tint {
  height: 100%;
  inset: 0;
  position: absolute;
  width: 100%;
}
.hero-video {
  filter: brightness(1.06) contrast(1.03) saturate(1.18) sepia(0.08);
  object-fit: cover;
}
.hero-tint {
  background:
    linear-gradient(90deg, rgba(16, 35, 12, 0.62), rgba(16, 35, 12, 0.04) 62%, rgba(16, 35, 12, 0.18)),
    linear-gradient(0deg, rgba(16, 9, 4, 0.25), transparent 45%);
}
.foliage { pointer-events: none; position: absolute; z-index: 2; }
.foliage-top { height: min(36vw, 450px); left: 0; object-fit: contain; object-position: left top; top: 0; width: min(68vw, 900px); }
.foliage-left { bottom: 0; height: min(44vw, 530px); left: 0; object-fit: cover; object-position: left bottom; width: min(42vw, 540px); }
.foliage-right { bottom: 0; height: min(41vw, 500px); object-fit: contain; object-position: right bottom; right: 0; width: min(42vw, 560px); }
.hero-layout { z-index: 3; }
.hero-copy { left: clamp(24px, 5vw, 76px); position: absolute; top: 24%; }
.hero-copy h1 {
  font-size: clamp(54px, 7vw, 108px);
  line-height: 0.86;
  margin: 20px 0 0;
  max-width: 800px;
}
.hero-lead { font-size: clamp(15px, 1.4vw, 20px); line-height: 1.45; margin: 24px 0 0; }
.card-action, .text-action {
  align-items: center;
  background: transparent;
  border: 0;
  cursor: pointer;
  display: inline-flex;
  gap: 16px;
  padding: 0;
}
.card-action {
  border-bottom: 1px solid currentColor;
  font-size: 12px;
  margin-top: 34px;
  padding-bottom: 8px;
  text-transform: uppercase;
}
.card-action span, .text-action span { transition: transform 180ms ease; }
.card-action:hover span, .text-action:hover span { transform: translateY(3px); }
.interaction-hint {
  bottom: 24px;
  font-size: 10px;
  left: 50%;
  letter-spacing: 0.05em;
  margin: 0;
  position: absolute;
  transform: translateX(-50%);
}
.interaction-hint span { font-size: 15px; margin-right: 7px; }
.media-control {
  align-items: center;
  background: rgba(16, 9, 4, 0.28);
  border: 1px solid rgba(255, 237, 215, 0.55);
  border-radius: 999px;
  bottom: 18px;
  cursor: pointer;
  display: flex;
  font-size: 10px;
  gap: 8px;
  padding: 8px 12px;
  position: absolute;
  right: 18px;
  z-index: 7;
}
.media-icon { display: inline-block; min-width: 10px; text-align: center; }

.panel-arrival {
  background: #120b07;
}
.gallery-layout { display: grid; gap: 24px clamp(28px, 5vw, 86px); grid-template-columns: minmax(230px, .72fr) minmax(0, 1.72fr); grid-template-rows: 1fr auto; min-height: 100%; padding: clamp(42px, 6vw, 92px) clamp(30px, 6vw, 96px) clamp(34px, 4vw, 62px); }
.gallery-heading { align-self: center; max-width: 400px; }
.gallery-heading h2 { font-size: clamp(48px, 5.5vw, 82px); line-height: .9; margin: 22px 0 26px; }
.gallery-heading > p:not(.eyebrow) { color: rgba(255, 237, 215, .75); font-size: clamp(15px, 1.35vw, 20px); line-height: 1.5; margin: 0; }
.accordion-gallery { --ag-accent: #d70000; --ag-gap: 10px; display: flex; gap: var(--ag-gap); grid-column: 2; grid-row: 1 / span 2; min-height: min(72dvh, 720px); overflow: hidden; perspective: 1100px; }
.ag-panel { appearance: none; background: #25140d; border: 0; border-radius: 16px; cursor: pointer; flex: 1 1 0; min-width: 0; overflow: hidden; padding: 0; position: relative; transform: rotateY(-8deg); transform-style: preserve-3d; transition: flex-grow .6s cubic-bezier(.2, .8, .2, 1), transform .6s cubic-bezier(.2, .8, .2, 1), filter .6s ease; }
.ag-panel--active { flex-grow: 4.33; transform: rotateY(0); }
.ag-panel.is-before { transform: rotateY(8deg); }
.ag-panel:not(.ag-panel--active) { filter: grayscale(1) brightness(.68); }
.ag-panel__frame, .ag-panel__media, .ag-panel__overlay { inset: 0; position: absolute; }
.ag-panel__media { align-items: center; display: flex; justify-content: center; transform: translate3d(0, 0, 0); transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.ag-panel.is-before .ag-panel__media { transform: translate3d(14px, 0, 0); }
.ag-panel.is-after .ag-panel__media { transform: translate3d(-14px, 0, 0); }
.ag-panel__media img { pointer-events: none; user-select: none; }
.ag-panel__backdrop { height: 100%; inset: 0; object-fit: cover; position: absolute; transform: scale(1.05); transition: transform .6s cubic-bezier(.2, .8, .2, 1); width: 100%; }
.ag-panel__character { height: 92%; object-fit: contain; position: relative; width: 100%; z-index: 1; }
.ag-panel--active .ag-panel__backdrop { transform: scale(1); }
.ag-panel__overlay { background: linear-gradient(180deg, rgba(18, 11, 7, .03) 35%, rgba(18, 11, 7, .82) 100%); }
.ag-panel__label { align-items: center; bottom: 23px; display: flex; gap: 11px; left: 19px; opacity: 0; position: absolute; transform: translateX(-14px); transition: opacity .55s ease, transform .55s cubic-bezier(.2, .8, .2, 1); z-index: 1; }
.ag-panel--active .ag-panel__label { opacity: 1; transform: translateX(0); }
.ag-panel__bar { background: var(--ag-accent); height: 2px; width: 30px; }
.ag-panel__text { color: var(--cream); font-size: clamp(13px, 1.4vw, 20px); font-weight: 500; letter-spacing: .02em; white-space: nowrap; }
.ag-panel:hover, .ag-panel:focus-visible { outline: 1px solid rgba(255, 237, 215, .8); outline-offset: -1px; }
.gallery-hint { align-self: end; color: rgba(255, 237, 215, .55); font-size: 10px; letter-spacing: .08em; margin: 0; }
.feature-layout {
  align-items: center;
  display: grid;
  gap: clamp(22px, 4vw, 70px);
  grid-template-columns: 0.85fr 1.25fr 0.9fr;
  padding: clamp(42px, 6vw, 92px) clamp(30px, 5vw, 78px);
}
.panel-heading h2, .view-copy h2 {
  font-size: clamp(48px, 5.5vw, 82px);
  line-height: 0.9;
  margin: 22px 0 0;
}
.character-stage { margin: 0; min-width: 0; position: relative; text-align: center; }
.character-stage img {
  height: min(67dvh, 690px);
  max-width: 100%;
  object-fit: contain;
  position: relative;
  z-index: 2;
}
.character-stage figcaption { color: var(--ember); font-size: 10px; letter-spacing: 0.08em; position: relative; z-index: 3; }
.stage-orbit, .character-halo {
  border: 1px solid rgba(255, 237, 215, 0.19);
  border-radius: 50%;
  left: 50%;
  pointer-events: none;
  position: absolute;
  top: 48%;
  transform: translate(-50%, -50%);
}
.orbit-one { aspect-ratio: 1; width: min(31vw, 470px); }
.orbit-two { aspect-ratio: 1; border-style: dashed; transform: translate(-50%, -50%) rotate(22deg); width: min(23vw, 350px); }
.panel-copy > p, .view-copy > p:not(.view-kicker) {
  font-size: clamp(20px, 2.1vw, 31px);
  line-height: 1.28;
  margin: 0;
}
.function-slot {
  border-left: 1px solid var(--ember);
  display: grid;
  gap: 7px;
  margin-top: 34px;
  padding: 3px 0 3px 14px;
}
.function-slot span { color: var(--ember); font-size: 9px; letter-spacing: 0.08em; }
.function-slot strong { font-size: 12px; font-weight: 500; }
.text-action { color: var(--cream); font-size: 11px; margin-top: 34px; text-decoration: underline; text-underline-offset: 6px; }

.panel-view { --accent: #e45d21; background: #20140d; }
.panel-front { background: radial-gradient(circle at 68% 45%, #6b2d14 0, #29170e 34%, #120a06 75%); }
.panel-side { --accent: #f0be55; background: radial-gradient(circle at 32% 50%, #554019 0, #241c0d 35%, #0f0c07 76%); }
.panel-back { --accent: #e98578; background: radial-gradient(circle at 70% 50%, #532327 0, #251013 36%, #0e0808 78%); }
.view-layout {
  align-items: center;
  display: grid;
  gap: 24px;
  grid-template-columns: 0.5fr 0.85fr 1.4fr;
  padding: clamp(42px, 5vw, 76px) clamp(30px, 6vw, 92px);
}
.view-layout.reverse { grid-template-columns: 0.5fr 1.4fr 0.85fr; }
.view-layout.reverse .view-copy { grid-column: 3; }
.view-layout.reverse .view-character { grid-column: 2; grid-row: 1; }
.view-meta { align-self: stretch; display: flex; flex-direction: column; justify-content: space-between; padding: 2px 0 8px; }
.view-number { color: rgba(255, 237, 215, 0.08); font-size: clamp(90px, 13vw, 210px); font-weight: 600; line-height: 0.7; }
.view-kicker { color: var(--accent); font-size: 10px; letter-spacing: 0.12em; margin: 0 0 16px; }
.view-copy > p:not(.view-kicker) { margin-top: 28px; max-width: 430px; }
.function-slot.compact { border-color: var(--accent); margin-top: 28px; }
.function-slot.compact span { color: var(--accent); }
.view-character { height: 100%; margin: 0; min-width: 0; position: relative; text-align: center; }
.view-character img {
  height: min(72dvh, 720px);
  max-width: 100%;
  object-fit: contain;
  position: relative;
  z-index: 2;
}
.character-halo {
  aspect-ratio: 1;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 18%, transparent), transparent 66%);
  border-color: color-mix(in srgb, var(--accent) 42%, transparent);
  width: min(37vw, 540px);
}
.panel-footer {
  bottom: 18px;
  color: rgba(255, 237, 215, 0.55);
  display: flex;
  font-size: 9px;
  justify-content: space-between;
  left: clamp(30px, 6vw, 92px);
  letter-spacing: 0.08em;
  position: absolute;
  right: clamp(30px, 6vw, 92px);
}

.deck-controls {
  align-items: center;
  background: rgba(16, 9, 4, 0.58);
  border: 1px solid rgba(255, 237, 215, 0.22);
  border-radius: 999px;
  display: none;
  flex-direction: column;
  gap: 13px;
  padding: 10px 8px;
  position: fixed;
  right: 30px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 40;
}
.deck-ready .deck-controls { display: flex; }
.control-arrow {
  background: transparent;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  font-size: 15px;
  height: 38px;
  padding: 0;
  width: 38px;
}
.control-arrow:disabled { cursor: default; opacity: 0.22; }
.page-count { align-items: baseline; display: flex; gap: 3px; writing-mode: vertical-rl; }
.page-count strong { font-size: 12px; font-weight: 500; }
.page-count span { color: rgba(255, 237, 215, 0.5); font-size: 8px; }
.page-dots { display: grid; gap: 1px; }
.page-dots button {
  align-items: center;
  background: transparent;
  border: 0;
  cursor: pointer;
  display: flex;
  height: 26px;
  justify-content: center;
  padding: 0;
  width: 26px;
}
.page-dots button::before {
  background: rgba(255, 237, 215, 0.35);
  border-radius: 50%;
  content: "";
  height: 5px;
  transition: background 180ms ease, transform 180ms ease;
  width: 5px;
}
.page-dots button.is-active::before { background: var(--cream); transform: scale(1.8); }

.noscript-note { background: var(--cream); color: var(--ink); margin: 0; padding: 12px; text-align: center; }
:focus-visible { outline: 2px solid #fff7a8; outline-offset: 4px; }

@media (max-width: 820px) {
  :root { --header-height: 60px; }
  .navigation { grid-template-columns: auto 1fr auto; padding-inline: max(14px, env(safe-area-inset-left)) max(14px, env(safe-area-inset-right)); }
  .page-nav { gap: 13px; justify-self: center; }
  .page-nav a { font-size: 9px; }
  .gallery-layout { display: flex; flex-direction: column; gap: 22px; padding: 86px 22px 36px; }
  .gallery-heading { max-width: 530px; }
  .gallery-heading h2 { font-size: clamp(42px, 12vw, 66px); margin: 16px 0; }
  .accordion-gallery { flex: 1; gap: 6px; min-height: min(53dvh, 550px); perspective: 750px; width: 100%; }
  .ag-panel { border-radius: 12px; transform: rotateY(-5deg); }
  .ag-panel.is-before { transform: rotateY(5deg); }
  .ag-panel--active { flex-grow: 3.5; transform: rotateY(0); }
  .ag-panel__label { bottom: 16px; left: 12px; }
  .ag-panel__bar { width: 18px; }
  .ag-panel__text { font-size: 13px; }
  .gallery-hint { align-self: flex-start; }
  .header-next span { display: none; }
  .deck-ready .panel { border-radius: 13px; inset: calc(var(--header-height) + env(safe-area-inset-top)) max(9px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(9px, env(safe-area-inset-left)); }
  .foliage-top { height: 50vw; width: 92vw; }
  .foliage-left { height: 42%; width: 49%; }
  .foliage-right { height: 48%; width: 55%; }
  .hero-copy { left: 18px; top: 20%; }
  .hero-copy h1 { font-size: clamp(50px, 15vw, 74px); }
  .hero-lead { font-size: 15px; }
  .interaction-hint { bottom: 126px; white-space: nowrap; }
  .media-control { bottom: 72px; right: 14px; }

  .feature-layout, .view-layout, .view-layout.reverse {
    align-content: start;
    display: grid;
    gap: 12px;
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr) auto;
    padding: 30px 18px 90px;
  }
  .panel-heading h2, .view-copy h2 { font-size: clamp(42px, 13vw, 62px); margin-top: 12px; }
  .panel-heading h2 br { display: none; }
  .character-stage { grid-row: 2; }
  .character-stage img { height: min(43dvh, 410px); }
  .orbit-one { width: min(74vw, 360px); }
  .orbit-two { width: min(58vw, 280px); }
  .panel-copy { grid-row: 3; }
  .panel-copy > p, .view-copy > p:not(.view-kicker) { font-size: clamp(17px, 5.2vw, 22px); }
  .function-slot { margin-top: 18px; }
  .text-action { margin-top: 20px; }

  .view-meta { align-self: auto; flex-direction: row; grid-column: 1; grid-row: 1; }
  .view-number { font-size: 52px; line-height: 0.8; }
  .view-copy, .view-layout.reverse .view-copy { grid-column: 1; grid-row: 3; }
  .view-copy h2 { margin-top: 0; }
  .view-copy > p:not(.view-kicker) { margin-top: 13px; }
  .view-kicker { margin-bottom: 8px; }
  .view-character, .view-layout.reverse .view-character { grid-column: 1; grid-row: 2; height: auto; }
  .view-character img { height: min(43dvh, 410px); }
  .character-halo { width: min(76vw, 380px); }
  .function-slot.compact { margin-top: 16px; }
  .panel-footer { bottom: 64px; left: 18px; right: 18px; }

  .deck-controls {
    bottom: max(19px, env(safe-area-inset-bottom));
    flex-direction: row;
    gap: 2px;
    left: 50%;
    padding: 6px 9px;
    right: auto;
    top: auto;
    transform: translateX(-50%);
  }
  .page-count { writing-mode: horizontal-tb; }
  .page-dots { display: flex; gap: 0; }
}

@media (max-width: 350px) {
  .navigation { grid-template-columns: 1fr auto; }
  .page-nav { display: none; }
}

@media (max-height: 700px) and (min-width: 821px) {
  .feature-layout, .view-layout { padding-block: 28px; }
  .character-stage img, .view-character img { height: min(65dvh, 500px); }
  .panel-heading h2, .view-copy h2 { font-size: clamp(42px, 5vw, 68px); }
  .panel-copy > p, .view-copy > p:not(.view-kicker) { font-size: clamp(18px, 1.8vw, 25px); }
  .function-slot, .text-action { margin-top: 20px; }
}

@media (max-width: 820px) and (max-height: 690px) {
  .feature-layout, .view-layout, .view-layout.reverse { padding-top: 19px; }
  .panel-heading h2, .view-copy h2 { font-size: clamp(36px, 10vw, 48px); }
  .character-stage img, .view-character img { height: min(36dvh, 280px); }
  .panel-copy > p, .view-copy > p:not(.view-kicker) { font-size: 16px; }
  .function-slot { display: none; }
}

@media (orientation: landscape) and (max-height: 560px) and (max-width: 900px) {
  .feature-layout, .view-layout, .view-layout.reverse {
    align-items: center;
    grid-template-columns: 0.8fr 1fr 0.9fr;
    grid-template-rows: 1fr;
    padding: 20px 64px 20px 24px;
  }
  .panel-heading, .view-meta { grid-column: 1; grid-row: 1; }
  .character-stage, .view-character, .view-layout.reverse .view-character { grid-column: 2; grid-row: 1; }
  .panel-copy, .view-copy, .view-layout.reverse .view-copy { grid-column: 3; grid-row: 1; }
  .character-stage img, .view-character img { height: min(69dvh, 330px); }
  .panel-heading h2, .view-copy h2 { font-size: 38px; }
  .view-number { font-size: 56px; }
  .panel-copy > p, .view-copy > p:not(.view-kicker) { font-size: 15px; }
  .panel-footer { display: none; }
  .deck-controls { bottom: auto; left: auto; right: 18px; top: 50%; transform: translateY(-50%); }
}

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