.scenarios {
  --scene-effect-offset: -2px;
  --scene-effect-scale: 1.032;
  padding-bottom: clamp(64px, 8vw, 120px);
}

.scene-selector {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(6px, 1.3vw, 16px);
  margin-block: clamp(24px, 4vw, 48px) 14px;
}

.scene-selector button {
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.3vw, 16px);
  min-height: 60px;
  padding: 7px 12px 7px 7px;
  border: 1px solid #e0e5eb;
  border-radius: 12px;
  background: #fff;
  color: #465365;
  font-size: clamp(12px, 1.3vw, 15px);
  font-weight: 600;
  text-align: left;
  transition: transform 190ms ease-out, background-color 140ms ease-out, border-color 140ms ease-out, color 140ms ease-out;
}

.scene-selector button::after { content: none; }

.scene-selector button img {
  width: clamp(40px, 5vw, 64px);
  height: auto;
  aspect-ratio: 16 / 11;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
}

.scene-selector button[aria-selected="true"] {
  border-color: #1c3556;
  background: #1c3556;
  color: #fff;
}

.scene-selector button:focus-visible {
  border-color: #8397b4;
  transform: translateY(var(--scene-effect-offset));
}
.scene-selector button:focus-visible,
.scene-gallery:focus-visible { outline-offset: 3px; }

.scene-gallery {
  display: grid;
  isolation: isolate;
  position: relative;
  align-content: end;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 22px;
  overflow: hidden;
  min-height: clamp(420px, 60svh, 660px);
  padding: clamp(22px, 4.4vw, 62px);
  border-radius: clamp(16px, 2vw, 28px);
  background: #0f1a26;
  color: #fff;
}

.scene-gallery-images,
.scene-gallery-images::after,
.scene-gallery-images img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.scene-gallery-images { z-index: -1; }

.scene-gallery-images::after {
  content: '';
  background: linear-gradient(5deg, #08121bec 6%, #08121ba8 33%, transparent 76%);
  pointer-events: none;
}

.scene-gallery-images img {
  object-fit: cover;
  opacity: 1;
  transition: opacity 220ms ease-out, transform 530ms cubic-bezier(.22, 1, .36, 1);
}

.scene-gallery-images img[aria-hidden="true"] { opacity: 0; }

.scene-gallery:focus-visible .scene-gallery-images img:not([aria-hidden="true"]) {
  transform: scale(var(--scene-effect-scale));
}

@media (hover: hover) and (pointer: fine) {
  .scene-selector button:hover {
    border-color: #8397b4;
    transform: translateY(var(--scene-effect-offset));
  }
  .scene-gallery:hover .scene-gallery-images img:not([aria-hidden="true"]) {
    transform: scale(var(--scene-effect-scale));
  }
}

#scene-en {
  color: #d5e6fb;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .12em;
}

#scene-title {
  margin: 12px 0 16px;
  font-size: clamp(34px, 5vw, 68px);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -.035em;
}

#scene-detail {
  max-width: 36em;
  color: #ecf1f7;
  font-size: clamp(14px, 1.35vw, 16px);
  line-height: 1.75;
}

.scene-gallery-note {
  color: #dce6f3;
  font-size: 12px;
  white-space: nowrap;
}

@media (max-width: 700px) {
  .scene-selector button {
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    padding: 5px 5px 8px;
    text-align: center;
    white-space: nowrap;
  }

  .scene-selector button img { width: 100%; }

  .scene-gallery {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    min-height: clamp(350px, 57svh, 490px);
  }

  #scene-en { font-size: 10px; }
}

.motion-paused .scenarios {
  --scene-effect-offset: 0;
  --scene-effect-scale: 1;
}
.motion-paused .scene-gallery-images img,
.motion-paused .scene-selector button { transition: none; }

@media (prefers-reduced-motion: reduce) {
  .scenarios {
    --scene-effect-offset: 0;
    --scene-effect-scale: 1;
  }
  .scene-gallery-images img,
  .scene-selector button { transition: none; }
}
