:root {
  --void-pink: #ff2da9;
  --void-violet: #7837ff;
  --void-cyan: #8af8ff;
  --void-gold: #ffd36a;
}

body.is-germain-ejection-open { overflow: hidden; }

.germain-ejection {
  position: fixed;
  z-index: 172;
  inset: 0;
  visibility: hidden;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  color: #fff5fc;
  background: #010005;
  transition: opacity .28s ease, visibility .28s ease;
}

.germain-ejection.is-open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.germain-ejection__space {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 52% 48%, rgba(96, 37, 214, .3), transparent 31%),
    radial-gradient(circle at 20% 14%, rgba(255, 38, 164, .13), transparent 22%),
    linear-gradient(155deg, #06001a, #010005 58%, #03010c);
}

.germain-ejection__space::before,
.germain-ejection__space::after,
.germain-ejection__stars {
  content: "";
  position: absolute;
  inset: -30%;
  pointer-events: none;
  background-image:
    radial-gradient(circle, rgba(255,255,255,.9) 0 1px, transparent 1.5px),
    radial-gradient(circle, rgba(183,137,255,.85) 0 1px, transparent 1.6px),
    radial-gradient(circle, rgba(255,198,93,.74) 0 1px, transparent 1.5px);
  background-position: 17px 23px, 61px 79px, 112px 39px;
  background-size: 137px 149px, 181px 193px, 227px 211px;
}

.germain-ejection__space::before { opacity: .54; }
.germain-ejection__space::after { opacity: .24; transform: scale(1.32) rotate(7deg); }
.germain-ejection__stars { opacity: .48; transform: scale(.62); animation: voidStars 4s cubic-bezier(.1,.7,.15,1) both; }

.germain-ejection__station {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 49%;
  width: min(76vmin, 680px);
  max-height: 88vh;
  filter: drop-shadow(0 0 22px rgba(105, 66, 255, .62)) drop-shadow(0 0 50px rgba(255, 178, 40, .2));
  transform: translate(-50%, -50%);
  transition: left .8s cubic-bezier(.2,.8,.2,1), width .8s cubic-bezier(.2,.8,.2,1), opacity .6s ease, filter .6s ease;
}

.germain-ejection__airlock {
  position: absolute;
  z-index: 3;
  top: 49%;
  left: 49%;
  width: 9vmin;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 222, 121, .85);
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0 5%, #aa72ff 9%, rgba(101,42,238,.4) 31%, transparent 64%);
  box-shadow: 0 0 18px #fff, 0 0 42px #884cff, 0 0 74px rgba(255, 206, 85, .48);
  transform: translate(-50%, -50%) scale(.2);
  opacity: 0;
}

.germain-ejection.is-ejecting .germain-ejection__airlock { animation: airlockBurst 1.4s .18s ease-out both; }

.germain-ejection__drifter {
  position: absolute;
  z-index: 5;
  top: 48%;
  left: 49%;
  width: clamp(42px, 8vmin, 92px);
  overflow: visible;
  opacity: 0;
  transform: translate(-50%, -50%) perspective(650px) rotateY(-10deg) rotateZ(-8deg) scale(.35);
  filter: drop-shadow(0 0 9px #ff4fb7) drop-shadow(0 0 22px rgba(135, 64, 255, .9));
}

.drifter-depth { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.drifter-depth--rear { stroke: #5b23d8; stroke-width: 10; opacity: .48; transform: translate(9px, 7px); }
.drifter-depth--front { stroke: #ff79cc; stroke-width: 4.2; }

.germain-ejection.is-ejecting .germain-ejection__drifter { animation: childDrifter 4s cubic-bezier(.12,.4,.2,1) both; }

.germain-ejection__wake {
  position: absolute;
  z-index: 4;
  top: 49%;
  left: 49%;
  width: 0;
  height: 2px;
  opacity: 0;
  background: linear-gradient(90deg, #fff, #ff4cb5 24%, #7844ff 55%, transparent);
  box-shadow: 0 0 8px #fff, 0 0 24px #ff2da9, 0 0 38px #7837ff;
  transform-origin: left center;
  transform: rotate(-24deg);
}

.germain-ejection.is-ejecting .germain-ejection__wake { animation: ejectionWake 3.7s .28s ease-out both; }

.germain-ejection__voice {
  position: absolute;
  z-index: 8;
  top: 50%;
  left: 50%;
  display: grid;
  min-width: min(460px, 78vw);
  padding: 18px 35px;
  border-block: 1px solid rgba(255, 84, 184, .55);
  text-align: center;
  opacity: 0;
  background: linear-gradient(90deg, transparent, rgba(8,0,16,.9) 18%, rgba(8,0,16,.9) 82%, transparent);
  transform: translate(-50%, -50%) scale(.8);
}

.germain-ejection.is-ejecting .germain-ejection__voice { animation: maGad 2.4s .34s ease both; }
.germain-ejection__voice small { color: var(--void-cyan); font: 700 7px/1 "Courier New", monospace; letter-spacing: .28em; }
.germain-ejection__voice strong { margin-top: 9px; color: white; font: 400 clamp(35px, 7vw, 68px)/.9 Georgia, serif; letter-spacing: .16em; text-shadow: 0 0 7px #fff, 0 0 23px var(--void-pink), 0 0 45px var(--void-violet); }

.germain-loss-panel {
  position: absolute;
  z-index: 12;
  top: 50%;
  left: 50%;
  display: grid;
  width: min(660px, calc(100vw - 28px));
  min-height: 465px;
  place-content: center;
  justify-items: center;
  overflow: hidden;
  padding: 44px clamp(24px, 6vw, 64px) 36px;
  border: 1px solid rgba(143, 247, 255, .7);
  clip-path: polygon(25px 0, 100% 0, 100% calc(100% - 25px), calc(100% - 25px) 100%, 0 100%, 0 25px);
  text-align: center;
  visibility: hidden;
  opacity: 0;
  background:
    repeating-linear-gradient(180deg, transparent 0 5px, rgba(255,83,184,.035) 6px),
    radial-gradient(circle at 50% 35%, rgba(112, 50, 255, .22), transparent 45%),
    rgba(6, 0, 13, .95);
  box-shadow: 0 32px 95px rgba(0,0,0,.9), 0 0 42px rgba(255,45,169,.22), inset 0 0 52px rgba(112,44,255,.1);
  transform: translate(-50%, -50%) perspective(800px) rotateX(8deg) scale(.92,.08);
}

.germain-ejection.is-panel .germain-ejection__station { left: 12%; width: min(35vmin, 320px); opacity: .22; filter: saturate(.65) drop-shadow(0 0 18px #6339e8); }
.germain-ejection.is-panel .germain-loss-panel { visibility: visible; animation: lossPanelMaterialize .72s steps(7, end) both; }

.germain-loss-panel::before,
.germain-loss-panel::after {
  content: "";
  position: absolute;
  width: 80px;
  height: 80px;
  pointer-events: none;
}
.germain-loss-panel::before { top: 10px; left: 10px; border-top: 2px solid var(--void-pink); border-left: 2px solid var(--void-pink); filter: drop-shadow(0 0 6px var(--void-pink)); }
.germain-loss-panel::after { right: 10px; bottom: 10px; border-right: 2px solid var(--void-cyan); border-bottom: 2px solid var(--void-cyan); filter: drop-shadow(0 0 6px var(--void-cyan)); }

.germain-loss-panel__beam { position: absolute; top: -40%; left: -30%; width: 25%; height: 180%; background: linear-gradient(90deg, transparent, rgba(173,247,255,.18), transparent); transform: skewX(-12deg); animation: lossBeam 3.2s ease-in-out infinite; }
.germain-loss-panel > p { z-index: 2; margin: 0 0 11px; color: var(--void-cyan); font: 700 7px/1 "Courier New", monospace; letter-spacing: .24em; text-shadow: 0 0 8px var(--void-cyan); }
.germain-loss-panel h2 { z-index: 2; margin: 0; font: 400 clamp(38px, 8vw, 70px)/.9 Georgia, serif; letter-spacing: .09em; text-shadow: 0 0 6px white, 0 0 18px var(--void-pink), 0 0 40px rgba(120,55,255,.8); }
.germain-loss-panel__orbit { z-index: 1; width: min(520px, 100%); height: 92px; margin-top: -4px; fill: none; stroke: url(#victoryVectorGradient); stroke-width: 1.2; opacity: .5; filter: drop-shadow(0 0 6px #8a60ff); }

.germain-loss-panel__paypal { z-index: 2; display: grid; grid-template-columns: 1fr 1fr; width: min(410px, 100%); gap: 12px; margin-top: 2px; }
.germain-loss-panel__paypal a { display: grid; min-height: 66px; place-content: center; border: 1px solid rgba(255,137,209,.62); clip-path: polygon(11px 0,100% 0,100% calc(100% - 11px),calc(100% - 11px) 100%,0 100%,0 11px); color: white; text-decoration: none; background: linear-gradient(145deg, rgba(105,38,246,.76), rgba(207,20,145,.84) 61%, rgba(41,3,56,.95)); box-shadow: 0 0 17px rgba(255,45,169,.25); transition: transform .18s ease, filter .18s ease, box-shadow .18s ease; }
.germain-loss-panel__paypal a:hover,
.germain-loss-panel__paypal a:focus-visible { outline: none; filter: brightness(1.18); transform: translateY(-3px); box-shadow: 0 0 26px rgba(255,45,169,.64), 0 0 38px rgba(138,248,255,.23); }
.germain-loss-panel__paypal small { color: var(--void-cyan); font: 700 6px/1 "Courier New", monospace; letter-spacing: .2em; }
.germain-loss-panel__paypal strong { margin-top: 6px; font: 700 19px/1 Georgia, serif; letter-spacing: .06em; }

.germain-loss-panel__azeroth { z-index: 2; min-width: 220px; min-height: 51px; margin-top: 18px; padding: 0 28px; border: 1px solid var(--void-gold); clip-path: polygon(10px 0,100% 0,100% calc(100% - 10px),calc(100% - 10px) 100%,0 100%,0 10px); color: #170608; background: linear-gradient(135deg, #9b4d07, #ffe99d 46%, #e99d21 64%, #682800); cursor: pointer; font: 800 12px/1 "Courier New", monospace; letter-spacing: .26em; text-indent: .26em; box-shadow: 0 0 18px rgba(255,205,91,.45), inset 0 1px 0 rgba(255,255,255,.7); transition: transform .17s ease, filter .17s ease, box-shadow .17s ease; }
.germain-loss-panel__azeroth:hover,
.germain-loss-panel__azeroth:focus-visible { outline: none; filter: brightness(1.2); transform: scale(1.035); box-shadow: 0 0 10px #fff, 0 0 30px rgba(255,205,91,.8); }

@keyframes voidStars { to { transform: translate(9%, -7%) scale(1.9); opacity: .12; } }
@keyframes airlockBurst { 0% { opacity: 0; transform: translate(-50%,-50%) scale(.12); } 18% { opacity: 1; } 62% { opacity: .9; transform: translate(-50%,-50%) scale(1.3); } 100% { opacity: 0; transform: translate(-50%,-50%) scale(2.3); } }
@keyframes childDrifter {
  0% { top: 48%; left: 49%; opacity: 0; transform: translate(-50%,-50%) perspective(650px) rotateY(-10deg) rotateZ(-8deg) scale(.35); }
  9% { opacity: 1; }
  35% { transform: translate(-50%,-50%) perspective(650px) rotateY(165deg) rotateZ(102deg) scale(1.08); }
  67% { opacity: .95; transform: translate(-50%,-50%) perspective(650px) rotateY(350deg) rotateZ(232deg) scale(.62); }
  100% { top: -13%; left: 119%; opacity: .08; transform: translate(-50%,-50%) perspective(650px) rotateY(690deg) rotateZ(510deg) scale(.08); }
}
@keyframes ejectionWake { 0% { width: 0; opacity: 0; } 12% { opacity: 1; } 68% { width: 92vw; opacity: .75; } 100% { width: 130vw; opacity: 0; } }
@keyframes maGad { 0%,100% { opacity: 0; transform: translate(-50%,-50%) scale(.82); } 12%,67% { opacity: 1; transform: translate(-50%,-50%) scale(1); } 71% { opacity: .25; } 76% { opacity: .9; } }
@keyframes lossPanelMaterialize { 0% { opacity: 0; transform: translate(-50%,-50%) perspective(800px) rotateX(8deg) scale(.92,.08); } 32% { opacity: .78; } 48% { opacity: .25; } 65% { opacity: 1; transform: translate(-50%,-50%) perspective(800px) rotateX(2deg) scale(1.02); } 100% { opacity: 1; transform: translate(-50%,-50%) perspective(800px) rotateX(0) scale(1); } }
@keyframes lossBeam { 0%,12% { left: -35%; } 76%,100% { left: 125%; } }

@media (max-width: 620px) {
  .germain-ejection__station { width: min(95vmin, 620px); }
  .germain-ejection.is-panel .germain-ejection__station { left: 8%; width: 38vmin; }
  .germain-loss-panel { min-height: 440px; padding-inline: 20px; }
  .germain-loss-panel__orbit { height: 74px; }
  .germain-loss-panel__paypal { gap: 8px; }
  .germain-loss-panel__paypal a { min-height: 61px; }
}

@media (max-height: 570px) and (min-width: 621px) {
  .germain-loss-panel { min-height: calc(100svh - 18px); padding-block: 20px; }
  .germain-loss-panel__orbit { height: 60px; }
  .germain-loss-panel__azeroth { margin-top: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .germain-ejection__stars,
  .germain-loss-panel__beam { animation: none !important; }
}
