* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body.welcome-gate-shell {
  --welcome-bg: #02070d;
  --welcome-panel: #071522;
  --welcome-glow-a: rgba(47, 96, 143, 0.26);
  --welcome-glow-b: rgba(31, 68, 111, 0.22);
  --welcome-accent: #4693ff;
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto minmax(0, 2fr);
  place-items: center;
  padding-top: max(18px, clamp(18px, 2vmin, 2rem), env(safe-area-inset-top));
  padding-right: max(18px, clamp(18px, 2.4vmin, 2.4rem), env(safe-area-inset-right));
  padding-bottom: max(18px, clamp(18px, 2.4vmin, 2.4rem), env(safe-area-inset-bottom));
  padding-left: max(18px, clamp(18px, 2.4vmin, 2.4rem), env(safe-area-inset-left));
  background: var(--welcome-bg, rgb(18 42 63 / 90%));
  color: rgb(230 237 243 / 90%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow: hidden;
}

body.welcome-gate-shell[data-welcome-palette="1"] {
  --welcome-bg: #020914;
  --welcome-panel: #071827;
  --welcome-glow-a: rgba(45, 104, 164, 0.28);
  --welcome-glow-b: rgba(23, 55, 96, 0.24);
}

body.welcome-gate-shell[data-welcome-palette="2"] {
  --welcome-bg: #030812;
  --welcome-panel: #0a1524;
  --welcome-glow-a: rgba(69, 117, 174, 0.24);
  --welcome-glow-b: rgba(27, 63, 109, 0.22);
}

body.welcome-gate-shell[data-welcome-palette="3"] {
  --welcome-bg: #020a12;
  --welcome-panel: #081724;
  --welcome-glow-a: rgba(54, 111, 158, 0.25);
  --welcome-glow-b: rgba(24, 58, 102, 0.23);
}

body.welcome-gate-shell[data-welcome-static-bg="1"] {
  background-image:
    linear-gradient(rgba(2, 7, 13, 0.54), rgba(2, 7, 13, 0.72)),
    var(--welcome-static-bg-image);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.welcome-gate-bg-video {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.30;
  filter: saturate(1.08) contrast(1.02);
  pointer-events: none;
  transition: opacity 1s ease;
  -webkit-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  will-change: opacity;
}

.welcome-gate-bg-video[data-welcome-bg-dimmed="1"] {
  opacity: 0.10;
}

.welcome-gate-bg-video[data-welcome-bg-disabled="1"] {
  display: none;
}

.welcome-gate-main {
  position: relative;
  grid-row: 2;
  z-index: 20;
  width: min(54rem, calc(100vw - 36px));
  max-height: calc(100svh - 36px);
  display: flex;
  /* Stacking is established by isolation + z-index. Do NOT promote this to its
     own GPU layer: a permanent translate3d/backface layer next to the fixed bg
     <video> intermittently restores blank on iOS/WebKit (modal present and
     clickable but unpainted). Keep the panel in the normal paint layer. */
  isolation: isolate;
}

.trust-gate-modal {
  position: relative;
  z-index: 21;
  width: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: clamp(0.75rem, 2vmin, 1.5rem);
  border: 1px solid rgb(230 237 243 / 58%);
  background: var(--welcome-panel, #071522);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.82),
    0 0 20px rgba(0, 0, 0, 0.70),
    inset 0 1px rgb(230 237 243 / 70%);
  color: rgb(230 237 243 / 90%);
  transition: border-color 1s ease, box-shadow 1s ease;
}

body.welcome-gate-shell[data-welcome-bg-dimmed="1"] .trust-gate-modal {
  border-color: rgb(230 237 243 / 20%);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.32),
    0 0 20px rgba(0, 0, 0, 0.30),
    inset 0 1px rgb(230 237 243 / 20%);
}

.trust-gate-modal__content {
  --welcome-content-pad: clamp(1.15rem, 3.2vmin, 2.65rem);
  --welcome-measure: min(48rem, 100%);
  --leave-action-width: clamp(5rem, 8vw, 6.25rem);
  --welcome-action-width: clamp(14rem, 26vw, 17rem);
  --welcome-action-height: clamp(2.75rem, 7vmin, 3.45rem);
  --welcome-action-pad: clamp(1.2rem, 2.7vmin, 1.6rem);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: clamp(0.75rem, 1.9vmin, 1.45rem);
  padding: var(--welcome-content-pad);
  text-align: center;
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
}

.trust-gate-modal__header {
  display: flex;
  flex-direction: column;
  align-self: center;
  gap: clamp(0.6rem, 0.8vmin, 0.5rem);
  width: var(--welcome-measure);
  margin-bottom: 0.8rem;
}

.trust-gate-modal__title {
  margin: 0;
  font-size: clamp(1.25rem, 5.5vmin, 3rem);
  line-height: 1.08;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: rgb(255 255 255 / 96%);
}

.trust-gate-modal__eyebrow {
  margin: 0;
  color: rgb(230 237 243 / 90%);
  font-size: clamp(0.8rem, 2.4vmin, 1.1rem);
  font-weight: 400;
}

.trust-gate-modal__intro {
  max-width: none;
  margin: clamp(0.4rem, 1.4vmin, 1rem) 0 0;
  padding-inline: clamp(0.15rem, 1vmin, 0.75rem);
  color: rgb(230 237 243 / 90%);
  font-size: clamp(0.85rem, 2.2vmin, 1rem);
  line-height: 1.4;
  text-align: left;
}

.trust-gate-modal__intro strong {
  color: #f6f8fa;
  font-weight: 600;
}

.trust-gate-modal__subtitle {
  min-height: 1.5em;
  margin: 0;
  color: #a7b0bd;
  font-size: clamp(0.9rem, 2.2vmin, 1.2rem);
}

.trust-gate-modal__player {
  width: 100%;
  inline-size: var(--welcome-measure);
  max-width: 48rem;
  max-height: min(56vh, calc(100svh - 17rem));
  aspect-ratio: 16 / 9;
  align-self: center;
  position: relative;
  overflow: hidden;
  border-radius: clamp(0.5rem, 1.4vmin, 0.9rem);
  background: #000;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 16px 44px rgba(0, 0, 0, 0.28);
  flex-shrink: 1;
  min-height: 0;
}

.trust-gate-modal__player::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: #000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.trust-gate-modal__player[data-welcome-video-switching="1"]::after {
  opacity: 1;
}

.trust-gate-modal__video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;
  background: #000;
  transition: transform 180ms ease;
}

.trust-gate-modal__play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: clamp(72px, 22vmin, 152px);
  height: clamp(72px, 22vmin, 152px);
  border: 0;
  border-radius: 50%;
  background: transparent;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 150ms ease, opacity 150ms ease;
}

.trust-gate-modal__play:hover {
  transform: scale(1.06);
}

.trust-gate-modal__play:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 4px;
}

.trust-gate-modal__play-icon {
  width: 100%;
  height: 100%;
  display: block;
}

.trust-gate-modal__play-icon--replay {
  display: none;
}

.trust-gate-modal__player[data-welcome-state="passed"] .trust-gate-modal__play-icon--play {
  display: none;
}

.trust-gate-modal__player[data-welcome-state="passed"] .trust-gate-modal__play-icon--replay {
  display: block;
}

.trust-gate-modal__loader {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  color: rgb(230 237 243 / 90%);
  font-size: 1rem;
  pointer-events: none;
  background: rgba(0, 0, 0, 0.38);
}

.trust-gate-modal__controls {
  position: absolute;
  left: clamp(0.7rem, 2vmin, 1rem);
  right: clamp(0.7rem, 2vmin, 1rem);
  bottom: clamp(0.7rem, 2vmin, 1rem);
  z-index: 2;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: clamp(0.5rem, 1.4vmin, 0.75rem);
  opacity: 0;
  pointer-events: none;
  transition: opacity 80ms ease;
}

.trust-gate-modal__player[data-welcome-state="playing"] .trust-gate-modal__controls,
.trust-gate-modal__player[data-welcome-state="buffering"] .trust-gate-modal__controls,
.trust-gate-modal__player[data-welcome-state="passed"] .trust-gate-modal__controls {
  opacity: 1;
  pointer-events: auto;
}

.trust-gate-modal__control {
  width: 2.75rem;
  height: 2.75rem;
  border: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: rgba(0, 0, 0, 0.52);
  cursor: pointer;
  transition: background 160ms ease;
}

.trust-gate-modal__control--volume > span {
  width: 100%;
  height: 100%;
  line-height: 0;
}

.trust-gate-modal__control--volume > span,
.trust-gate-modal__control svg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.trust-gate-modal__control svg {
  display: block;
}

.trust-gate-modal__control--restart {
  width: auto;
  min-width: 0;
  height: clamp(2.35rem, 5.2vmin, 2.9rem);
  padding: 0 clamp(0.85rem, 2.2vmin, 1.15rem);
  gap: 0.5rem;
  font-size: clamp(0.85rem, 2vmin, 1rem);
  font-weight: 650;
  opacity: 0;
  pointer-events: none;
}

.trust-gate-modal__player[data-welcome-controls-visible="1"][data-welcome-replay-ready="1"]:not([data-welcome-state="passed"]) .trust-gate-modal__control--restart {
  opacity: 1;
  pointer-events: auto;
}

.trust-gate-modal__control--restart:hover {
  background: rgba(0, 0, 0, 0.7);
}

.trust-gate-modal__control--volume {
  margin-left: auto;
}

.trust-gate-modal__control--volume:hover {
  background: rgba(0, 0, 0, 0.7);
}

.trust-gate-modal__control[data-welcome-muted="0"] [data-welcome-volume-off],
.trust-gate-modal__control[data-welcome-muted="1"] [data-welcome-volume-on] {
  display: none;
}

.trust-gate-modal__player[data-welcome-exiting="1"] .trust-gate-modal__play,
.trust-gate-modal__player[data-welcome-exiting="1"] .trust-gate-modal__loader,
.trust-gate-modal__player[data-welcome-exiting="1"] .trust-gate-modal__controls,
.trust-gate-modal__player[data-welcome-exiting="1"] .trust-gate-verify-modal {
  display: none;
}

.trust-gate-modal__spinner {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.32);
  border-top-color: #ffffff;
  animation: trust-gate-spin 800ms linear infinite;
}

@keyframes trust-gate-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes trust-gate-button-spin {
  from {
    transform: translateY(-50%) rotate(0deg);
  }

  to {
    transform: translateY(-50%) rotate(360deg);
  }
}

.trust-gate-modal__progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgb(230 237 243 / 22%);
}

.trust-gate-modal__progress-bar {
  display: block;
  height: 100%;
  width: 100%;
}

.trust-gate-modal__progress-svg {
  display: block;
  width: 100%;
  height: 100%;
}

.trust-gate-modal__progress-fill {
  fill: #4693ff;
}

.trust-gate-modal__player[data-welcome-state="idle"] .trust-gate-modal__play,
.trust-gate-modal__player[data-welcome-state="ready"] .trust-gate-modal__play,
.trust-gate-modal__player[data-welcome-state="passed"] .trust-gate-modal__play,
.trust-gate-modal__player[data-welcome-state="error"] .trust-gate-modal__play {
  display: inline-flex;
}

.trust-gate-modal__player[data-welcome-state="verifying"] .trust-gate-modal__play,
.trust-gate-modal__player[data-welcome-state="loading"] .trust-gate-modal__play,
.trust-gate-modal__player[data-welcome-state="playing"] .trust-gate-modal__play,
.trust-gate-modal__player[data-welcome-state="buffering"] .trust-gate-modal__play {
  display: none;
}

.trust-gate-modal__player[data-welcome-state="verifying"] .trust-gate-modal__loader,
.trust-gate-modal__player[data-welcome-state="loading"] .trust-gate-modal__loader,
.trust-gate-modal__player[data-welcome-state="buffering"] .trust-gate-modal__loader {
  display: flex;
}

.trust-gate-modal__turnstile {
  min-height: 4rem;
  display: none;
  align-items: center;
  justify-content: center;
}

.trust-gate-modal__turnstile[data-welcome-turnstile-state="interactive"],
.trust-gate-modal__turnstile[data-welcome-turnstile-state="error"],
.trust-gate-modal__turnstile[data-welcome-turnstile-state="expired"] {
  display: flex;
}

.trust-gate-verify-modal[hidden] {
  display: none;
}

.trust-gate-verify-modal {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 4vmin, 2rem);
}

.trust-gate-verify-modal__backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 40%, rgba(70, 147, 255, 0.18), transparent 18rem),
    rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(3px);
}

.trust-gate-verify-modal__card {
  position: relative;
  width: min(22rem, 100%);
  display: grid;
  justify-items: center;
  gap: 0.75rem;
  padding: clamp(1rem, 3vmin, 1.4rem);
  border: 1px solid rgb(230 237 243 / 20%);
  border-radius: 1rem;
  background: rgb(7 21 34 / 92%);
  color: rgb(230 237 243 / 92%);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.44);
  text-align: center;
}

.trust-gate-verify-modal__title {
  margin: 0;
  color: #ffffff;
  font-size: clamp(1rem, 2.8vmin, 1.25rem);
  font-weight: 650;
}

.trust-gate-verify-modal__copy,
.trust-gate-verify-modal__hint {
  margin: 0;
  color: rgb(230 237 243 / 82%);
  font-size: clamp(0.8rem, 2.2vmin, 0.95rem);
  line-height: 1.4;
}

.trust-gate-verify-modal__hint {
  color: rgb(230 237 243 / 68%);
}

.trust-gate-verify-modal__turnstile {
  min-height: 4rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.trust-gate-modal__notice {
  width: var(--welcome-measure);
  max-width: none;
  align-self: center;
  margin: 0;
  padding-inline: clamp(0.15rem, 1vmin, 0.75rem);
  color: rgb(230 237 243 / 90%);
  font-size: clamp(0.85rem, 2.2vmin, 1rem);
  font-style: italic;
  line-height: 1.4;
  text-align: left;
  margin-top: 0.8rem;
  margin-bottom: 0.8rem;
}

.trust-gate-modal__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  align-self: center;
  width: var(--welcome-measure);
  padding-inline: clamp(0.15rem, 1vmin, 0.75rem);
  gap: clamp(0.5rem, 1.6vmin, 1rem);
}

.trust-gate-modal__continue-group {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  margin-left: auto;
  gap: clamp(0.4rem, 1.4vmin, 0.75rem);
}

.trust-gate-modal__leave,
.trust-gate-modal__skip,
.trust-gate-modal__agree {
  -webkit-appearance: none;
  appearance: none;
  border: 0;
  min-height: var(--welcome-action-height);
  border-radius: 999px;
  font-size: clamp(0.85rem, 2.2vmin, 1rem);
  cursor: pointer;
  transition: opacity 200ms, background 200ms;
}

.trust-gate-modal__leave,
.trust-gate-modal__skip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 var(--welcome-action-pad);
  color: rgba(230, 237, 243, 0.82);
  background: rgb(78 103 126 / 28%);
}

.trust-gate-modal__leave {
  width: var(--leave-action-width);
}

.trust-gate-modal__skip {
  font-weight: 500;
  width: auto;
  min-width: 4.75rem;
}

.trust-gate-modal__skip[hidden] {
  display: none;
}

.trust-gate-modal__agree {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  gap: clamp(0.7rem, 1.8vmin, 1rem);
  min-width: var(--welcome-action-width);
  width: var(--welcome-action-width);
  white-space: nowrap;
  flex-shrink: 0;
  padding: 0 var(--welcome-action-pad);
  background: #4693ff;
  color: #ffffff;
  font-weight: 500;
}

.trust-gate-modal__agree-label {
  position: static;
  text-align: center;
  pointer-events: none;
}

.trust-gate-modal__agree-icon {
  position: static;
  width: 24px;
  height: 24px;
  transform: none;
  transition: opacity 160ms ease;
  flex: 0 0 auto;
}

.trust-gate-modal__agree::after {
  content: "";
  position: absolute;
  right: 10px;
  top: 50%;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  opacity: 0;
  transform: translateY(-50%);
}

.trust-gate-modal__agree[data-welcome-loading="1"]::after {
  opacity: 1;
  animation: trust-gate-button-spin 800ms linear infinite;
}

.trust-gate-modal__agree[data-welcome-loading="1"] .trust-gate-modal__agree-icon {
  opacity: 0;
}

.trust-gate-modal__skip:disabled,
.trust-gate-modal__agree:disabled {
  opacity: 0.45;
  cursor: default;
  pointer-events: none;
}

.trust-gate-modal__actions[data-welcome-active="1"] .trust-gate-modal__leave {
  visibility: hidden;
  pointer-events: none;
}

@media (max-width: 640px) {
  .welcome-gate-main {
    width: calc(100vw - 36px);
  }

  .trust-gate-modal__content {
    --welcome-content-pad: clamp(1rem, 4.25vw, 1.4rem);
    --leave-action-width: clamp(4.5rem, 18vw, 6rem);
    --welcome-action-width: clamp(13rem, 64vw, 16rem);
    --welcome-action-pad: clamp(0.95rem, 3.2vw, 1.25rem);
    gap: clamp(0.75rem, 3vw, 1.15rem);
  }

  .trust-gate-modal__header {
    width: 100%;
    padding-inline: 12px;
  }

  .trust-gate-modal__title {
    white-space: nowrap;
    font-size: clamp(1.35rem, 6.4vw, 2.35rem);
  }

  .trust-gate-modal__eyebrow {
    white-space: nowrap;
    font-size: clamp(0.9rem, 3.4vw, 1.1rem);
  }

  .trust-gate-modal__notice {
    font-size: clamp(0.92rem, 3.45vw, 1.08rem);
  }

  .trust-gate-modal__intro,
  .trust-gate-modal__notice,
  .trust-gate-modal__actions {
    padding-inline: 0;
  }

  .trust-gate-modal__player {
    inline-size: calc(100% + (var(--welcome-content-pad) * 2));
    max-width: none;
    max-height: min(44vh, calc(100svh - 15rem));
    margin-inline: calc(var(--welcome-content-pad) * -1);
    aspect-ratio: 4 / 3;
    border-radius: 0;
  }

  .trust-gate-modal__video {
    object-fit: cover;
  }

  .trust-gate-modal__continue-group {
    flex-direction: row;
    justify-content: flex-end;
    margin-left: auto;
  }
}

@media (min-width: 641px) {
  .trust-gate-modal__player[data-welcome-state="playing"] .trust-gate-modal__video,
  .trust-gate-modal__player[data-welcome-state="buffering"] .trust-gate-modal__video,
  .trust-gate-modal__player[data-welcome-state="passed"] .trust-gate-modal__video {
    transform: scale(1.16);
  }
}

@media (pointer: coarse) {
  .welcome-gate-main {
    width: min(58rem, calc(100vw - 36px));
  }

  .trust-gate-modal__continue-group {
    flex-direction: row;
    justify-content: flex-end;
    margin-left: auto;
  }
}

@media (max-height: 760px), (orientation: landscape) and (max-height: 700px) {
  .welcome-gate-main {
    width: min(58rem, calc(100vw - 36px));
  }

  .trust-gate-modal__player {
    inline-size: min(48rem, 100%);
    max-width: 48rem;
    max-height: min(70vh, calc(100svh - 13rem));
    aspect-ratio: 16 / 9;
  }
}

@media (max-width: 640px) and (max-height: 760px), (max-width: 640px) and (pointer: coarse) and (orientation: portrait) {
  .trust-gate-modal__player {
    inline-size: calc(100% + (var(--welcome-content-pad) * 2));
    max-width: none;
    max-height: min(42vh, calc(100svh - 14rem));
    aspect-ratio: 4 / 3;
  }
}

@media (max-height: 560px) {
  .trust-gate-modal__player {
    max-height: min(70vh, calc(100svh - 11rem));
  }

  .trust-gate-modal__title {
    font-size: clamp(1.1rem, 4.4vmin, 1.85rem);
  }

  .trust-gate-modal__intro,
  .trust-gate-modal__notice {
    line-height: 1.3;
  }

  .trust-gate-modal__content {
    gap: clamp(0.35rem, 1vmin, 0.75rem);
    --welcome-content-pad: clamp(0.6rem, 2vmin, 1.4rem);
    padding: var(--welcome-content-pad);
  }
}

@media (max-width: 640px) and (max-height: 560px) {
  .trust-gate-modal__player {
    inline-size: calc(100% + (var(--welcome-content-pad) * 2));
    max-width: none;
    max-height: min(42vh, calc(100svh - 14rem));
    margin-inline: calc(var(--welcome-content-pad) * -1);
    aspect-ratio: 4 / 3;
  }
}
