.gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  min-height: 100svh;
  place-items: center;
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(circle at 7% 14%, #ff008c 0 2px, transparent 3px),
    radial-gradient(circle at 13% 8%, #ff008c 0 5px, transparent 6px),
    radial-gradient(circle at 91% 17%, #00bffc 0 3px, transparent 4px),
    radial-gradient(circle at 96% 27%, #00bffc 0 6px, transparent 7px),
    radial-gradient(ellipse at -8% 25%, #ec007a55, transparent 42%),
    radial-gradient(ellipse at 108% 28%, #008fd650, transparent 44%),
    linear-gradient(180deg, #05060b 0%, #080610 58%, #03050a 100%);
  perspective: 1200px;
}

.gate[hidden] { display: none; }

.gate::before {
  content: '';
  position: absolute;
  inset: 12px;
  z-index: 6;
  border: 1px solid #c49a562b;
  pointer-events: none;
}

.gate::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, #ff008c28 0 1px, transparent 1px 100%) 9% 0 / 19px 100% no-repeat,
    linear-gradient(90deg, transparent 0 87%, #00c8ff1f 87% 87.2%, transparent 87.2%),
    radial-gradient(ellipse at center, transparent 30%, #03030a5c 68%, #020207c7 100%),
    linear-gradient(180deg, transparent 0 36%, #0806108f 55%, #080610e8 100%);
  pointer-events: none;
}

.gate-light {
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 20% 12%, #ff008c35, transparent 35%),
    radial-gradient(ellipse at 83% 11%, #00c8ff32, transparent 36%);
  mix-blend-mode: screen;
  pointer-events: none;
  animation: gate-lights 900ms ease-out both;
}

.gate-light::before,
.gate-light::after {
  display: none;
}

.wheel-stage {
  position: absolute;
  left: 50%;
  top: -15%;
  z-index: 0;
  width: min(94vw, 940px);
  height: min(94vw, 940px);
  transform: translateX(-50%) rotateX(57deg);
  transform-style: preserve-3d;
  opacity: .72;
  pointer-events: none;
}

.wheel-stage::before,
.wheel-stage::after {
  content: '';
  position: absolute;
  inset: -3%;
  z-index: 1;
  border-radius: 50%;
  pointer-events: none;
}

.wheel-stage::before {
  background: linear-gradient(90deg, #ff008c45, transparent 42% 58%, #00c8ff45);
  mix-blend-mode: screen;
}

.wheel-stage::after { box-shadow: inset 0 0 85px 35px #010207, 0 28px 75px #000c; }

.gate .roulette {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  border: 0;
  border-radius: 50%;
  background: none;
  opacity: 1;
  box-shadow: none;
  animation: gate-wheel 96s linear infinite;
  will-change: transform;
}

.gate-graffiti {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.gate-graffiti svg {
  position: absolute;
  width: clamp(58px, 8vw, 102px);
  height: auto;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 8;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: .72;
  filter: drop-shadow(0 0 9px currentColor);
}

.gate-graffiti .graffiti-echo { stroke-width: 2.5; opacity: .55; }
.gate-graffiti .graffiti-fill { fill: currentColor; stroke: none; }
.gate-graffiti .graffiti-cutout { fill: #080610; stroke: none; }
.graffiti-smile { top: 7%; right: 18%; color: #ff168f; transform: rotate(8deg); }
.graffiti-whip { right: 5%; bottom: 13%; color: #00c8ff; transform: rotate(-11deg); }
.graffiti-heart { left: 5%; bottom: 10%; color: #ff168f; transform: rotate(-8deg); }
.graffiti-handcuffs { left: 6%; top: 43%; width: clamp(86px, 11vw, 132px) !important; color: #00c8ff; transform: rotate(-7deg); }
.graffiti-skull { right: 6%; top: 41%; width: clamp(70px, 8vw, 102px) !important; color: #ff168f; transform: rotate(7deg); }

.gate-content {
  position: relative;
  z-index: 4;
  width: min(100% - 36px, 780px);
  margin: 0;
  padding: 30px 18px 24px;
  text-align: center;
  background: none;
  text-shadow: 0 3px 22px #000;
  animation: gate-content-in 850ms ease-out both;
}

.gate .eyebrow {
  margin: 0;
  color: #dbc294;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .38em;
  padding-left: .38em;
}

.gate-name-rule {
  display: block;
  width: 58px;
  height: 2px;
  margin: 15px auto 22px;
  background: linear-gradient(90deg, #ff008c, #ff43b4);
  box-shadow: 0 0 15px #ff008c99;
}

.gate-title {
  margin: 0;
  color: #f7efe9;
  font: 500 clamp(54px, 7.6vw, 92px)/.94 'Bodoni Moda', Georgia, serif;
  letter-spacing: -.045em;
  text-transform: none;
}

.gate-title > span { display: block; white-space: nowrap; }

.gate-title em {
  display: inline-block;
  color: #ff008c;
  font: italic 400 1em/.9 'Bodoni Moda', Georgia, serif;
  letter-spacing: -.055em;
  text-transform: none;
  text-shadow: 0 0 32px #ff008c55;
  transform: rotate(-2deg);
}

.gate #age-question {
  margin: 27px 0 0;
  color: #f4e6d7;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: .18em;
}

.gate .pills {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin: 25px 0 0;
  perspective: none;
}

.gate .pill {
  position: relative;
  isolation: isolate;
  width: min(100%, 420px);
  min-width: 0;
  min-height: 58px;
  padding: 15px 28px;
  transform: none;
  border: 1px solid #ff8badb0;
  border-radius: 999px;
  color: #fff8f3;
  background: linear-gradient(90deg, transparent 49.6%, #ffffff18 50%, transparent 50.4%), radial-gradient(ellipse at 50% 0%, #ffb2c99c, transparent 48%), linear-gradient(180deg, #a40637, #6f001f 62%, #39000f);
  box-shadow: inset 0 2px 2px #ffd6e288, inset 0 -7px 10px #220009b8, 0 0 0 3px #ff24552e, 0 0 24px #ff174f6b;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .32em;
  text-transform: uppercase;
  text-shadow: 0 1px 3px #000b;
  transition: transform 180ms ease, box-shadow 180ms ease;
  animation: gate-pill-in 900ms 120ms both;
}

.gate .pill::before {
  content: '';
  position: absolute;
  left: 10%;
  right: 10%;
  top: 5px;
  z-index: -1;
  height: 33%;
  border-radius: 50%;
  background: linear-gradient(#fff7, #ffffff05);
}

.gate .pill.blue {
  border-color: #59dcffb0;
  color: #f2fcff;
  background: linear-gradient(90deg, transparent 49.6%, #ffffff19 50%, transparent 50.4%), radial-gradient(ellipse at 50% 0%, #bbf2ff8f, transparent 48%), linear-gradient(180deg, #0875a6, #034d75 62%, #01233d);
  box-shadow: inset 0 2px 2px #d6f7ff88, inset 0 -7px 10px #001426b8, 0 0 0 3px #00bfff2b, 0 0 24px #00bfff62;
  animation-delay: 210ms;
}

.gate .pill:hover {
  transform: translateY(-3px) scale(1.01);
  box-shadow: inset 0 2px 2px #ffd6e288, inset 0 -7px 10px #220009b8, 0 0 0 4px #ff24553b, 0 0 34px #ff174f8c;
}

.gate .pill.blue:hover {
  transform: translateY(-3px) scale(1.01);
  box-shadow: inset 0 2px 2px #d6f7ff88, inset 0 -7px 10px #001426b8, 0 0 0 4px #00bfff38, 0 0 34px #00bfff7d;
}

.gate .pill:focus-visible { outline: 2px solid #f4e6d7; outline-offset: 7px; }

.gate #gate-note {
  min-height: 20px;
  max-width: 340px;
  margin: 16px auto 0;
  color: #baabb9;
  font: italic 12px/1.5 Georgia, serif;
}

.gate-corner {
  position: absolute;
  right: 28px;
  bottom: 21px;
  z-index: 4;
  color: #c49a5694;
  font: 15px Georgia, serif;
  letter-spacing: 5px;
}

.gate-sweep {
  position: absolute;
  inset: -50%;
  z-index: 5;
  opacity: 0;
  transform: translateX(-80%);
  background: linear-gradient(110deg, transparent 42%, #ff008c2b 48%, #00c8ff38 51%, transparent 57%);
  pointer-events: none;
}

.gate.entering { pointer-events: none; animation: gate-exit 1.35s ease-in-out forwards; }
.gate.entering .roulette { animation-duration: 1.8s; }
.gate.entering .red { transform: scale(1.025); box-shadow: inset 0 3px 10px #ffdbd9aa, 0 0 55px #f94687b0, 0 0 105px #ff008c55; }
.gate.entering .gate-sweep { animation: gate-sweep 1.2s ease-in-out forwards; }
.gate.refused .wheel-stage { opacity: .34; }
.gate.refused #gate-note { color: #e8c6cf; }
.gate .pill[hidden] { display: none; }

@keyframes gate-wheel { to { transform: rotate(360deg); } }
@keyframes gate-lights { from { opacity: 0; } to { opacity: 1; } }
@keyframes gate-content-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes gate-pill-in { from { opacity: 0; translate: 0 14px; } to { opacity: 1; translate: 0 0; } }
@keyframes gate-exit { 0%, 50% { opacity: 1; } 100% { opacity: 0; visibility: hidden; } }
@keyframes gate-sweep { 0% { opacity: 0; transform: translateX(-60%); } 35% { opacity: .8; } 100% { opacity: 0; transform: translateX(60%); } }

@media (max-width: 700px) {
  .gate::before { inset: 8px; }
  .wheel-stage { top: -2%; width: 132vw; height: 132vw; transform: translateX(-50%) rotateX(60deg); opacity: .66; }
  .gate-content { width: min(100% - 26px, 520px); padding: 22px 12px 18px; }
  .gate .eyebrow { font-size: 9px; letter-spacing: .34em; padding-left: .34em; }
  .gate-name-rule { width: 45px; margin: 11px auto 17px; }
  .gate-title { font-size: clamp(45px, 12vw, 66px); }
  .gate #age-question { margin-top: 21px; font-size: 13px; letter-spacing: .12em; }
  .gate .pills { gap: 13px; margin-top: 20px; }
  .gate .pill { width: min(86vw, 350px); min-height: 54px; padding: 13px 22px; font-size: 10px; letter-spacing: .28em; }
  .gate #gate-note { margin-top: 13px; font-size: 11px; }
  .gate-corner { right: 18px; bottom: 15px; font-size: 11px; }
  .gate-graffiti svg { width: 62px; stroke-width: 7; opacity: .58; }
  .graffiti-smile { top: 6%; right: 20%; width: 70px; }
  .graffiti-whip { right: 7%; bottom: 18%; }
  .graffiti-heart { left: 2%; bottom: 12%; }
  .graffiti-handcuffs { left: 4%; top: 42%; width: 94px !important; }
  .graffiti-skull { right: 4%; top: 41%; width: 70px !important; }
}

@media (max-height: 600px) {
  .gate-content { padding-top: 14px; padding-bottom: 12px; }
  .gate-name-rule { margin-top: 8px; margin-bottom: 12px; }
  .gate-title { font-size: clamp(42px, 11.2vw, 58px); }
  .gate #age-question { margin-top: 15px; }
  .gate .pills { margin-top: 15px; gap: 11px; }
  .gate .pill { min-height: 48px; padding-block: 10px; }
  .gate #gate-note { margin-top: 10px; }
  .gate-corner { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .gate,
  .gate * { animation: none !important; transition: none !important; }
  .gate.entering { opacity: 0; }
  .gate .roulette { will-change: auto; }
  .gate-sweep { display: none; }
}
