.raid-journey {
  --journey-height: max(560px, calc(100svh - var(--head)));
  --journey-copper: #eea16c;
  --journey-distance: 3.55;
  background: #09090c;
  color: #f7ede5;
  scroll-margin-top: var(--head);
}

.journey-stage {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  isolation: isolate;
  border-block: 1px solid #80524650;
  background: radial-gradient(ellipse 54% 28% at 47% 100%, #45231b50, transparent 98%), #09090c;
}

.journey-ready:not(.journey-static) {
  height: calc(var(--journey-height) * var(--journey-distance));
  background: transparent;
}

.journey-ready:not(.journey-static) .journey-stage {
  position: sticky;
  top: var(--head);
  height: var(--journey-height);
  overflow: clip;
  background: radial-gradient(ellipse 54% 28% at 47% 100%, #45231b24, transparent 98%);
}

.journey-aria-heading {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.journey-world { position: relative; z-index: 1; min-height: 0; }
.journey-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 66% 75% at 51% 97%, rgb(var(--journey-light, 245 112 55) / .08), transparent);
  pointer-events: none;
}
.journey-objects { position: relative; }
.journey-spine { display: none; }

.journey-card {
  position: relative;
  min-width: 0;
  color: #f7ebe1;
  border: 1px solid #8d6e601f;
  border-radius: 3px;
  background: linear-gradient(156deg, #19151a, #101014 76%);
  box-shadow: 0 24px 57px #000b;
}

.journey-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 54%;
  height: 1px;
  z-index: 1;
  background: linear-gradient(90deg, rgb(var(--journey-light, 245 112 55) / .77), transparent);
  pointer-events: none;
}

.journey-media { position: relative; isolation: isolate; overflow: clip; height: clamp(7.3rem, 21svh, 12.5rem); background: #191319; border-radius: 2px 2px 0 0; }
.journey-media > img { display: block; width: 100%; height: 100%; object-fit: cover; }
.journey-media > .journey-overlay-plate { position: absolute; width: 54%; height: auto; inset: .75rem .75rem auto auto; object-fit: contain; transition: opacity .44s ease; }
.journey-media > .journey-overlay-plate[aria-hidden="true"] { opacity: 0; }
.journey-media::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 -10px 30px #0b080b85; pointer-events: none; }
.journey-client-frame > img { object-position: center 31%; }
.journey-channel-frame > img { object-position: center 26%; }
.journey-keys > img { filter: brightness(.55); object-position: center; }
.journey-keys > div { position: absolute; z-index: 1; inset: 0; display: flex; align-items: center; justify-content: center; gap: clamp(.45rem, 1vw, .85rem); }
.journey-keys kbd { display: grid; place-items: center; min-width: 3.15rem; min-height: 2.5rem; padding: .25rem .55rem; color: #fce3c5; background: #201619ee; border: 1px solid #936753; border-bottom-width: 3px; border-radius: 5px; font: 700 1rem var(--mono); transition: translate .24s ease, background .24s ease, border-color .24s ease, box-shadow .24s ease; }
#journey-hotkeys[data-journey-phase="1"] kbd:last-child { translate: 0 3px; color: #212025; background: #ffd1a0; border-color: #ffe5bd; }
#journey-hotkeys[data-journey-phase="2"] kbd:last-child { border-color: #f4ae74; box-shadow: 0 0 18px #f4aa6863; }
.journey-l2-veil { position: absolute; z-index: 2; background: #232126; transition: opacity .42s ease; }
#journey-l2[data-journey-phase="1"] .journey-l2-veil { opacity: 0; }
.journey-mute-marker { position: absolute; z-index: 1; inset: auto .55rem .65rem auto; display: flex; align-items: center; gap: .35rem; padding: .35rem .54rem; color: #ffd9d2; background: #352124ee; border: 1px solid #a15e58; font-size: .87rem; }
.journey-mute-marker img { display: block; }
.journey-mute-badge { display: flex; align-items: center; gap: .35rem; color: #ffc1b6; transition: opacity .38s ease, translate .38s ease; }
.journey-mute-badge[aria-hidden="true"] { opacity: 0; translate: -.25rem 0; }
.journey-themes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; }
.journey-themes > img { min-width: 0; object-position: left 23%; }
.journey-ready .journey-themes { display: block; }
.journey-ready .journey-themes > img,
.journey-media > .journey-pin-frame { position: absolute; inset: 0; transition: opacity .46s ease; }
.journey-ready .journey-themes > img[aria-hidden="true"],
.journey-media > .journey-pin-frame[aria-hidden="true"] { opacity: 0; }
.journey-pin-marker { position: absolute; z-index: 2; border: 1px solid #ffe2aebd; border-radius: 3px; box-shadow: 0 0 15px #fda25d56; pointer-events: none; opacity: 0; transition: opacity .36s ease; }
#journey-channel[data-journey-phase="1"] .journey-pin-marker,
#journey-channel[data-journey-phase="2"] .journey-pin-marker { opacity: 1; }

.journey-card-copy { padding: .82rem clamp(.88rem, 1.45vw, 1.3rem) .98rem; line-height: 1.48; }
.journey-card-copy h3 { color: #ffe3c8; font: 550 clamp(1.45rem, 2.2vw, 2.28rem) / 1.05 var(--display); letter-spacing: -.026em; text-wrap: balance; }
.journey-card-copy p { margin-top: .52rem; max-width: 52ch; color: #e0d0c7; font-size: clamp(.86rem, 1.08vw, 1.02rem); }
.journey-card-copy .journey-demo-status { min-height: 2.7em; margin: 0 0 .3rem; color: rgb(var(--journey-light, 245 112 55) / .92); font-size: clamp(.72rem, .88vw, .84rem); font-weight: 575; line-height: 1.35; }
.journey-clan-link { display: inline-flex; align-items: center; gap: .6rem; min-height: 37px; margin-top: .28rem; color: #ffd8ac; text-decoration: underline; text-underline-offset: .28em; }
.journey-clan-link:hover { color: #fff0d8; }

.journey-ready:not(.journey-static) .journey-world { perspective: 1120px; perspective-origin: 48% 49%; overflow: clip; }
.journey-ready:not(.journey-static) .journey-objects { position: absolute; inset: 0; transform-style: preserve-3d; }
.persistent-spine {
  position: fixed;
  z-index: 0;
  inset: var(--head) 0 0;
  overflow: clip;
  pointer-events: none;
  opacity: var(--spine-opacity, var(--journey-local-opacity, 0));
  transform: translateX(var(--spine-offset, 0px));
  transition: opacity .34s ease, transform .44s cubic-bezier(.2, .72, .22, 1);
}
.persistent-spine.is-journey-scene { --journey-local-opacity: 1; }
.persistent-spine > .journey-spine { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.journey-ready:not(.journey-static) .journey-card {
  position: absolute;
  left: 0;
  top: 0;
  width: clamp(18rem, 28vw, 29rem);
  transform-origin: center;
  will-change: transform, opacity;
}
.journey-ready:not(.journey-static) .journey-card[aria-hidden="true"] { pointer-events: none; }
.journey-ready:not(.journey-static) .journey-card[aria-current="step"] { border-color: rgb(var(--journey-light, 245 112 55) / .29); }

.journey-raid-gate { display: none; }
.journey-ready:not(.journey-static) .journey-raid-gate {
  display: block;
  position: absolute;
  z-index: 4;
  inset: 0;
  clip-path: inset(var(--gate-top, 50%) var(--gate-right, 18%) var(--gate-bottom, 50%) var(--gate-left, 60%) round var(--gate-radius, 16px));
  opacity: var(--gate-opacity, 0);
  pointer-events: none;
  background: #160d12;
}
.journey-raid-gate video { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 47%; }
.journey-raid-gate::after { content: ""; position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 52px #12090e8a; }

.raid-journey:not(.journey-ready) .journey-objects,
.journey-static .journey-objects {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(.8rem, 1.5vw, 1.3rem);
  width: min(100% - 2 * var(--gutter), 1470px);
  margin: clamp(1.4rem, 4.2vw, 3.6rem) auto;
}

@media (prefers-reduced-motion: reduce) {
  .persistent-spine { display: none; }
  .journey-card, .journey-media * { transition: none; }
}
