.eluna-scroll-story {
  --story-intro-opacity: 1;
  --story-intro-y: 0px;
  --story-wash-scale: 0.04;
  --story-wash-opacity: 0.72;
  --story-card-a-opacity: 0;
  --story-card-b-opacity: 0;
  --story-card-c-opacity: 0;
  --story-card-a-blur: 16px;
  --story-card-b-blur: 16px;
  --story-card-c-blur: 16px;
  --story-card-a-x: 0vw;
  --story-card-a-y: 0vh;
  --story-card-b-x: 0vw;
  --story-card-b-y: 0vh;
  --story-card-c-x: 0vw;
  --story-card-c-y: 0vh;
  --story-card-a-rotate: 0deg;
  --story-card-b-rotate: 0deg;
  --story-card-c-rotate: 0deg;
  --story-card-a-scale: 0.84;
  --story-card-b-scale: 0.8;
  --story-card-c-scale: 0.82;
  --story-final-opacity: 0;
  --story-final-y: 34px;
  --story-ghost-opacity: 0.08;
  --story-progress-height: 0%;
  position: relative;
  height: 500svh;
  margin: 0;
  color: #273a40;
  background: #dfe8eb;
}

.eluna-scroll-story--zoom-start {
  --story-card-a-scale: 0.32;
}

.eluna-scroll-story__stage {
  position: sticky;
  top: 0;
  height: 100svh;
  min-height: 640px;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 76% 18%, rgba(255, 255, 255, 0.72), transparent 31%),
    linear-gradient(135deg, #d7e2e6 0%, #e9eff1 46%, #cddce1 100%);
}

.eluna-scroll-story__stage::before,
.eluna-scroll-story__stage::after {
  position: absolute;
  z-index: 7;
  content: "";
  pointer-events: none;
}

.eluna-scroll-story__stage::before {
  inset: 22px;
  border: 1px solid rgba(45, 66, 73, 0.13);
}

.eluna-scroll-story__stage::after {
  top: 0;
  right: 0;
  bottom: 0;
  width: 15vw;
  background: linear-gradient(90deg, transparent, rgba(230, 238, 240, 0.74));
}

.eluna-scroll-story__wash {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 50%;
  width: min(44vw, 650px);
  aspect-ratio: 1;
  border-radius: 50%;
  opacity: var(--story-wash-opacity);
  background: rgba(250, 249, 245, 0.98);
  box-shadow: 0 0 100px rgba(255, 255, 255, 0.4);
  pointer-events: none;
  transform: translate(-50%, -50%) scale(var(--story-wash-scale));
  will-change: transform, opacity;
}

.eluna-scroll-story__ghost {
  position: absolute;
  z-index: 0;
  right: -0.06em;
  bottom: -0.16em;
  margin: 0;
  color: rgba(41, 62, 69, var(--story-ghost-opacity));
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(110px, 20vw, 310px);
  font-weight: 400;
  line-height: 0.8;
  letter-spacing: 0.02em;
  white-space: nowrap;
  pointer-events: none;
}

.eluna-scroll-story__intro {
  position: absolute;
  z-index: 6;
  top: clamp(110px, 15vh, 170px);
  left: clamp(52px, 7vw, 118px);
  width: min(410px, 35vw);
  opacity: var(--story-intro-opacity);
  transform: translateY(var(--story-intro-y));
  will-change: opacity, transform;
}

.eluna-scroll-story__eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 24px;
  color: rgba(39, 58, 64, 0.66);
  font-family: "Cormorant Garamond", serif;
  font-size: 15px;
  line-height: 1;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.eluna-scroll-story__eyebrow small {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid rgba(39, 58, 64, 0.28);
  border-radius: 50%;
  font-family: inherit;
  font-size: 10px;
  letter-spacing: 0;
}

.eluna-scroll-story__intro h2 {
  margin: 0;
  font-family: "Shippori Mincho B1", serif;
  font-size: clamp(29px, 3vw, 48px);
  font-weight: 400;
  line-height: 1.65;
  letter-spacing: 0.055em;
}

.eluna-scroll-story__intro > p:not(.eluna-scroll-story__eyebrow) {
  margin: 28px 0 0;
  color: rgba(39, 58, 64, 0.68);
  font-family: "Noto Sans JP", sans-serif;
  font-size: 13px;
  font-weight: 300;
  line-height: 2;
  letter-spacing: 0.1em;
}

.eluna-scroll-story__cue {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.eluna-scroll-story.is-audio-playing .eluna-scroll-story__cue {
  opacity: var(--story-cue-opacity, 0.16);
  transform: translateY(var(--story-cue-y, 12px));
  transition: opacity 90ms linear, transform 90ms linear;
  will-change: opacity, transform;
}

.eluna-scroll-story__actions {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.eluna-scroll-story__play {
  position: relative;
  z-index: 10;
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 30px 0 0;
  padding: 0 17px 0 23px;
  border: 1px solid #273a40;
  border-radius: 999px;
  color: #fff;
  background: #273a40;
  box-shadow: 0 12px 28px rgba(39, 58, 64, 0.16);
  font-family: "Noto Sans JP", sans-serif;
  font-size: 13px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.12em;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: color 260ms ease, background-color 260ms ease, box-shadow 260ms ease, transform 260ms ease;
}

.eluna-scroll-story__actions .eluna-scroll-story__play {
  margin-top: 0;
}

.eluna-scroll-story__play--sequence {
  padding-right: 14px;
  padding-left: 18px;
  border-color: rgba(39, 58, 64, 0.32);
  color: #273a40;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: 0 10px 24px rgba(39, 58, 64, 0.1);
  font-size: 11px;
}

.eluna-scroll-story__play--sequence i {
  border-color: rgba(39, 58, 64, 0.34);
}

.eluna-scroll-story__play--sequence:hover {
  color: #fff;
  background: #273a40;
}

.eluna-scroll-story__play--sequence:hover i {
  border-color: rgba(255, 255, 255, 0.44);
}

.eluna-scroll-story__play i {
  display: grid;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.44);
  border-radius: 50%;
}

.eluna-scroll-story__play i::before {
  width: 0;
  height: 0;
  margin-left: 2px;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 6px solid currentColor;
  content: "";
}

.eluna-scroll-story__play:hover {
  color: #273a40;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 15px 34px rgba(39, 58, 64, 0.2);
  transform: translateY(-2px);
}

.eluna-scroll-story__play:hover i {
  border-color: rgba(39, 58, 64, 0.34);
}

.eluna-scroll-story__play:focus-visible {
  outline: 2px solid #273a40;
  outline-offset: 4px;
}

.eluna-scroll-story__play.is-playing i::before {
  width: 6px;
  height: 6px;
  margin-left: 0;
  border: 0;
  background: currentColor;
}

.eluna-scroll-story__canvas {
  position: absolute;
  z-index: 2;
  inset: 0;
  pointer-events: none;
}

.eluna-scroll-story__card {
  position: absolute;
  top: 50%;
  left: 50%;
  margin: 0;
  overflow: hidden;
  border: 7px solid rgba(255, 255, 255, 0.88);
  background: #edf2f3;
  box-shadow: 0 30px 70px rgba(32, 50, 56, 0.18);
  transform-origin: center;
  will-change: transform, opacity, filter;
}

.eluna-scroll-story__card img,
.eluna-scroll-story__card video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.74) contrast(0.94) brightness(1.06);
}

.eluna-scroll-story__card video {
  pointer-events: none;
}

.eluna-scroll-story__card figcaption {
  position: absolute;
  right: 14px;
  bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 9px;
  color: #2d4249;
  background: rgba(250, 249, 245, 0.84);
  font-family: "Cormorant Garamond", serif;
  font-size: 13px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
}

.eluna-scroll-story__card figcaption span {
  font-size: 9px;
  opacity: 0.62;
}

.eluna-scroll-story__card--dialogue {
  z-index: 2;
  width: min(42vw, 620px);
  aspect-ratio: 3 / 2;
  opacity: var(--story-card-a-opacity);
  filter: blur(var(--story-card-a-blur));
  transform: translate(calc(-50% + var(--story-card-a-x)), calc(-50% + var(--story-card-a-y))) rotate(var(--story-card-a-rotate)) scale(var(--story-card-a-scale));
}

.eluna-scroll-story__card--dialogue img,
.eluna-scroll-story__card--dialogue video {
  object-position: 50% 45%;
}

.eluna-scroll-story__card--film {
  z-index: 3;
  width: min(35vw, 520px);
  aspect-ratio: 16 / 10;
  opacity: var(--story-card-b-opacity);
  filter: blur(var(--story-card-b-blur));
  transform: translate(calc(-50% + var(--story-card-b-x)), calc(-50% + var(--story-card-b-y))) rotate(var(--story-card-b-rotate)) scale(var(--story-card-b-scale));
}

.eluna-scroll-story__card--film img,
.eluna-scroll-story__card--film video {
  object-position: 58% 50%;
}

.eluna-scroll-story__card--web {
  z-index: 4;
  width: min(43vw, 640px);
  aspect-ratio: 16 / 9;
  opacity: var(--story-card-c-opacity);
  filter: blur(var(--story-card-c-blur));
  transform: translate(calc(-50% + var(--story-card-c-x)), calc(-50% + var(--story-card-c-y))) rotate(var(--story-card-c-rotate)) scale(var(--story-card-c-scale));
}

.eluna-scroll-story__final {
  position: absolute;
  z-index: 6;
  top: 50%;
  left: 50%;
  width: min(520px, 48vw);
  opacity: var(--story-final-opacity);
  pointer-events: none;
  text-align: center;
  transform: translate(-50%, calc(-50% + var(--story-final-y)));
  will-change: opacity, transform;
}

.eluna-scroll-story__final > p:first-child {
  margin: 0 0 25px;
  color: rgba(41, 61, 68, 0.64);
  font-family: "Cormorant Garamond", serif;
  font-size: 14px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.eluna-scroll-story__final h3 {
  margin: 0;
  font-family: "Shippori Mincho B1", serif;
  font-size: clamp(32px, 4vw, 62px);
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: 0.07em;
}

.eluna-scroll-story__final > p:last-child {
  margin: 26px 0 0;
  color: rgba(41, 61, 68, 0.7);
  font-family: "Noto Sans JP", sans-serif;
  font-size: 13px;
  font-weight: 300;
  line-height: 2;
  letter-spacing: 0.12em;
}

.eluna-scroll-story__steps {
  position: absolute;
  z-index: 8;
  right: clamp(28px, 3.4vw, 56px);
  bottom: clamp(30px, 5vh, 58px);
  display: flex;
  gap: clamp(14px, 2.1vw, 32px);
  margin: 0;
  padding: 0;
  list-style: none;
  color: rgba(41, 61, 68, 0.54);
  font-family: "Cormorant Garamond", serif;
  font-size: 11px;
  pointer-events: none;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.eluna-scroll-story__steps li {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.eluna-scroll-story__steps span {
  font-size: 8px;
  opacity: 0.64;
}

.eluna-scroll-story__progress {
  position: absolute;
  z-index: 8;
  top: 50%;
  right: 25px;
  width: 1px;
  height: 118px;
  overflow: hidden;
  background: rgba(41, 61, 68, 0.16);
  pointer-events: none;
  transform: translateY(-50%);
}

.eluna-scroll-story__progress span {
  display: block;
  width: 100%;
  height: var(--story-progress-height);
  background: rgba(41, 61, 68, 0.7);
}

.eluna-scroll-story--logos .eluna-scroll-story__card img {
  box-sizing: border-box;
  padding: clamp(10px, 1.35vw, 22px);
  object-fit: contain;
  object-position: 50% 50%;
  background: #fbfaf7;
  filter: saturate(0.86) contrast(0.98) brightness(1.01);
}

.eluna-scroll-story--logos .eluna-scroll-story__card--dialogue img,
.eluna-scroll-story--logos .eluna-scroll-story__card--film img,
.eluna-scroll-story--logos .eluna-scroll-story__card--web img {
  object-position: 50% 50%;
}

@media (max-width: 900px) {
  .eluna-scroll-story {
    height: 430svh;
  }

  .eluna-scroll-story__stage {
    min-height: 620px;
  }

  .eluna-scroll-story__stage::before {
    inset: 12px;
  }

  .eluna-scroll-story__stage::after {
    width: 22vw;
  }

  .eluna-scroll-story__wash {
    width: 78vw;
  }

  .eluna-scroll-story__ghost {
    right: -0.2em;
    bottom: 0.06em;
    font-size: 31vw;
  }

  .eluna-scroll-story__intro {
    top: 12vh;
    right: 28px;
    left: 28px;
    width: auto;
    text-align: center;
  }

  .eluna-scroll-story__eyebrow {
    justify-content: center;
    margin-bottom: 18px;
    font-size: 13px;
  }

  .eluna-scroll-story__intro h2 {
    font-size: clamp(24px, 7vw, 34px);
    line-height: 1.65;
  }

  .eluna-scroll-story__intro > p:not(.eluna-scroll-story__eyebrow) {
    margin-top: 18px;
    font-size: 12px;
  }

  .eluna-scroll-story__play {
    min-height: 48px;
    gap: 10px;
    margin-top: 22px;
    padding: 0 12px 0 17px;
    font-size: 11px;
  }

  .eluna-scroll-story__actions {
    justify-content: center;
    gap: 8px;
    margin-top: 22px;
  }

  .eluna-scroll-story__actions .eluna-scroll-story__play {
    margin-top: 0;
  }

  .eluna-scroll-story__play--sequence {
    font-size: 10px;
  }

  .eluna-scroll-story__play i {
    width: 21px;
    height: 21px;
  }

  .eluna-scroll-story__card {
    border-width: 4px;
  }

  .eluna-scroll-story__card--dialogue {
    width: min(74vw, 430px);
  }

  .eluna-scroll-story__card--film {
    width: min(68vw, 390px);
  }

  .eluna-scroll-story__card--web {
    width: min(80vw, 460px);
  }

  .eluna-scroll-story__card figcaption {
    right: 7px;
    bottom: 7px;
    padding: 4px 6px;
    font-size: 10px;
  }

  .eluna-scroll-story__final {
    width: 84vw;
  }

  .eluna-scroll-story__final > p:first-child {
    margin-bottom: 18px;
    font-size: 11px;
  }

  .eluna-scroll-story__final h3 {
    font-size: clamp(28px, 8.6vw, 42px);
    line-height: 1.55;
  }

  .eluna-scroll-story__final > p:last-child {
    margin-top: 20px;
    font-size: 11px;
  }

  .eluna-scroll-story__steps {
    right: 22px;
    bottom: 24px;
    left: 22px;
    justify-content: space-between;
    gap: 8px;
    font-size: 9px;
  }

  .eluna-scroll-story__steps li {
    gap: 3px;
  }

  .eluna-scroll-story__progress {
    right: 14px;
    height: 82px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .eluna-scroll-story {
    --story-intro-opacity: 0;
    --story-wash-scale: 4;
    --story-card-a-opacity: 0.48;
    --story-card-b-opacity: 0.48;
    --story-card-c-opacity: 0.48;
    --story-card-a-blur: 0px;
    --story-card-b-blur: 0px;
    --story-card-c-blur: 0px;
    --story-card-a-x: -28vw;
    --story-card-a-y: 12vh;
    --story-card-b-x: 29vw;
    --story-card-b-y: -18vh;
    --story-card-c-x: 27vw;
    --story-card-c-y: 22vh;
    --story-card-a-rotate: -7deg;
    --story-card-b-rotate: 6deg;
    --story-card-c-rotate: -4deg;
    --story-card-a-scale: 0.7;
    --story-card-b-scale: 0.66;
    --story-card-c-scale: 0.68;
    --story-final-opacity: 1;
    --story-final-y: 0px;
    --story-progress-height: 100%;
    height: auto;
  }

  .eluna-scroll-story__stage {
    position: relative;
  }

  .eluna-scroll-story__play {
    display: none;
  }
}
