html,
body {
  min-height: 100%;
  background: #080d0e !important;
  cursor: url("/portal-assets/portal-cursor-32.png") 6 2, auto !important;
}

body {
  overflow-x: hidden;
}

body *,
button,
a,
input,
textarea,
select,
[role="button"] {
  cursor: url("/portal-assets/portal-cursor-32.png") 6 2, auto !important;
}

.portal-auth-shell {
  --portal-bg-x: 0px;
  --portal-bg-y: 0px;
  --portal-blur-x: 0px;
  --portal-blur-y: 0px;
  --portal-fx-x: 0px;
  --portal-fx-y: 0px;
  position: relative;
  isolation: isolate;
  background: #080d0e !important;
}

.portal-auth-shell::before,
.portal-auth-shell::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.portal-auth-shell::before {
  background:
    radial-gradient(ellipse at 0% 52%, rgba(2, 6, 8, 0.42), transparent 44%),
    radial-gradient(ellipse at 100% 52%, rgba(2, 6, 8, 0.44), transparent 42%),
    linear-gradient(180deg, rgba(3, 7, 8, 0.12), rgba(3, 7, 8, 0.34));
}

.portal-auth-shell::after {
  background:
    radial-gradient(circle at 48% 34%, rgba(255, 228, 168, 0.09), transparent 30rem),
    radial-gradient(circle at 56% 42%, rgba(74, 203, 229, 0.07), transparent 22rem);
  opacity: 0.82;
  transform: translate3d(var(--portal-fx-x), var(--portal-fx-y), 0);
  will-change: transform;
}

.portal-auth-shell > :not(.portal-background):not(.portal-background-blur):not(.portal-background-shade):not(.portal-auth-announcement-button) {
  position: relative;
  z-index: 2;
}

.portal-auth-shell .portal-background,
.portal-auth-shell .portal-background-blur,
.portal-auth-shell .portal-background-shade {
  position: fixed !important;
  inset: -44px !important;
  pointer-events: none !important;
}

.portal-auth-shell .portal-background {
  z-index: -4 !important;
  background:
    image-set(
      url("/portal-assets/portal-bg-scene-desktop.webp") type("image/webp"),
      url("/portal-assets/portal-bg-scene-desktop.jpg") type("image/jpeg")
    ) center center / cover no-repeat !important;
  filter: brightness(1.08) saturate(1.04);
  transform: translate3d(var(--portal-bg-x), var(--portal-bg-y), 0) scale(1.045);
  transform-origin: center;
  will-change: transform;
}

.portal-auth-shell .portal-background-blur {
  z-index: -3 !important;
  background:
    image-set(
      url("/portal-assets/portal-bg-scene-desktop.webp") type("image/webp"),
      url("/portal-assets/portal-bg-scene-desktop.jpg") type("image/jpeg")
    ) center center / cover no-repeat !important;
  filter: blur(22px) brightness(1.02) saturate(1.08);
  opacity: 0.12 !important;
  transform: translate3d(var(--portal-blur-x), var(--portal-blur-y), 0) scale(1.08);
  transform-origin: center;
  will-change: transform;
}

.portal-auth-shell .portal-background-shade {
  z-index: -2 !important;
  background:
    linear-gradient(90deg, rgba(3, 6, 7, 0.2), rgba(3, 6, 7, 0.03) 38%, rgba(3, 6, 7, 0.08) 64%, rgba(3, 6, 7, 0.34)),
    linear-gradient(180deg, rgba(3, 6, 7, 0.03), rgba(3, 6, 7, 0.36)) !important;
}

.portal-auth-fx-canvas {
  display: none !important;
}

.portal-auth-announcement-button {
  position: fixed;
  top: clamp(16px, 3vw, 28px);
  right: clamp(16px, 3vw, 32px);
  z-index: 4;
  min-width: 72px;
  border: 1px solid rgba(244, 195, 95, 0.42);
  border-radius: 999px;
  padding: 9px 18px;
  color: #f7e5b8;
  background: rgba(8, 13, 13, 0.5);
  box-shadow: 0 14px 42px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  cursor: pointer;
  font-size: 14px;
  line-height: 1.2;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.portal-auth-shell > .portal-auth-announcement-button {
  position: fixed;
  z-index: 4;
}

.portal-auth-announcement-button:hover {
  transform: translateY(-1px);
  border-color: rgba(244, 195, 95, 0.72);
  background: rgba(18, 25, 24, 0.68);
}

.portal-auth-announcement-modal,
.portal-auth-image-preview {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.portal-auth-announcement-modal.active,
.portal-auth-image-preview.active {
  display: flex;
}

.portal-auth-announcement-backdrop,
.portal-auth-image-preview-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(3, 6, 6, 0.68);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  cursor: pointer;
}

.portal-auth-announcement-panel {
  position: relative;
  width: min(680px, calc(100vw - 32px));
  max-height: min(760px, calc(100vh - 36px));
  overflow: hidden;
  border: 1px solid rgba(244, 195, 95, 0.22);
  border-radius: 16px;
  color: #f4ead1;
  background: rgba(10, 16, 16, 0.82);
  box-shadow: 0 26px 90px rgba(0, 0, 0, 0.52), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
}

.portal-auth-announcement-header {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 16px;
  align-items: start;
  padding: 22px 24px 16px;
  border-bottom: 1px solid rgba(244, 195, 95, 0.14);
}

.portal-auth-announcement-kicker {
  grid-column: 1;
  color: rgba(244, 195, 95, 0.8);
  font-size: 12px;
  line-height: 1.2;
  text-transform: uppercase;
}

.portal-auth-announcement-header h2 {
  grid-column: 1;
  margin: 0;
  color: #fff7df;
  font-size: 22px;
  line-height: 1.2;
  font-weight: 650;
}

.portal-auth-announcement-close,
.portal-auth-image-preview-close {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  width: 34px;
  height: 34px;
  color: #f7e5b8;
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

.portal-auth-announcement-close {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.portal-auth-announcement-list-view,
.portal-auth-announcement-detail-view {
  max-height: calc(min(760px, calc(100vh - 36px)) - 92px);
  overflow: auto;
  padding: 18px 18px 22px;
}

.portal-auth-announcement-list {
  display: grid;
  gap: 10px;
}

.portal-auth-announcement-row {
  width: 100%;
  border: 1px solid rgba(244, 195, 95, 0.14);
  border-radius: 12px;
  padding: 16px;
  text-align: left;
  color: inherit;
  background: rgba(255, 255, 255, 0.045);
  cursor: pointer;
}

.portal-auth-announcement-row:hover {
  border-color: rgba(244, 195, 95, 0.36);
  background: rgba(244, 195, 95, 0.08);
}

.portal-auth-announcement-row-copy {
  display: grid;
  gap: 6px;
}

.portal-auth-announcement-row strong {
  color: #fff8e6;
  font-size: 16px;
  line-height: 1.35;
}

.portal-auth-announcement-row span,
.portal-auth-announcement-row time,
.portal-auth-announcement-state span,
.portal-auth-announcement-detail-view time,
.portal-auth-announcement-detail-copy {
  color: rgba(244, 234, 209, 0.76);
  font-size: 14px;
  line-height: 1.7;
}

.portal-auth-announcement-state {
  display: grid;
  gap: 8px;
  justify-items: center;
  padding: 42px 18px;
  text-align: center;
}

.portal-auth-announcement-state strong {
  color: #fff8e6;
  font-size: 17px;
}

.portal-auth-announcement-back {
  border: 0;
  margin: 0 0 16px;
  padding: 0;
  color: #f3d99d;
  background: transparent;
  cursor: pointer;
  font-size: 14px;
}

.portal-auth-announcement-back::before {
  content: "< ";
}

.portal-auth-announcement-detail-view h3 {
  margin: 0 0 8px;
  color: #fff8e6;
  font-size: 22px;
  line-height: 1.3;
}

.portal-auth-announcement-images {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.portal-auth-announcement-image {
  overflow: hidden;
  border: 1px solid rgba(244, 195, 95, 0.16);
  border-radius: 12px;
  padding: 0;
  background: rgba(255, 255, 255, 0.04);
  cursor: zoom-in;
}

.portal-auth-announcement-image img {
  display: block;
  width: 100%;
  max-height: 280px;
  object-fit: contain;
}

.portal-auth-announcement-detail-copy p {
  margin: 0 0 12px;
  white-space: pre-line;
}

.portal-auth-announcement-detail-copy ul {
  margin: 0 0 12px;
  padding-left: 20px;
}

.portal-auth-image-preview-frame {
  position: relative;
  width: min(920px, calc(100vw - 32px));
  max-height: calc(100vh - 36px);
  margin: 0;
}

.portal-auth-image-preview-frame img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 36px);
  margin: auto;
  border-radius: 14px;
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.58);
}

.portal-auth-image-preview-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
  background: rgba(7, 10, 10, 0.72);
}

.turnstile-wrapper,
.turnstile-container,
.turnstile-container iframe,
iframe[src*="challenges.cloudflare.com"] {
  pointer-events: auto !important;
}

.turnstile-container,
iframe[src*="challenges.cloudflare.com"] {
  position: relative;
  z-index: 2;
}

.portal-turnstile-notice {
  margin-top: 8px;
  color: #f3d99d;
  font-size: 12px;
  line-height: 1.5;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track {
  background: #101817;
}

html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(244, 195, 95, 0.42);
}

@media (max-width: 720px) {
  .portal-auth-shell .portal-background {
    background:
      image-set(
        url("/portal-assets/portal-bg-scene-mobile.webp") type("image/webp"),
        url("/portal-assets/portal-bg-scene-mobile.jpg") type("image/jpeg")
      ) center center / cover no-repeat !important;
    transform: translate3d(calc(var(--portal-bg-x) * 0.55), calc(var(--portal-bg-y) * 0.55), 0) scale(1.035);
  }

  .portal-auth-shell .portal-background-blur {
    background:
      image-set(
        url("/portal-assets/portal-bg-scene-mobile.webp") type("image/webp"),
        url("/portal-assets/portal-bg-scene-mobile.jpg") type("image/jpeg")
      ) center center / cover no-repeat !important;
  }

  .portal-auth-announcement-button {
    top: 12px;
    right: 12px;
    padding: 8px 14px;
  }

  .portal-auth-announcement-modal,
  .portal-auth-image-preview {
    padding: 14px;
  }

  .portal-auth-announcement-panel {
    border-radius: 14px;
  }

  .portal-auth-announcement-header {
    padding: 18px 18px 14px;
  }

  .portal-auth-announcement-list-view,
  .portal-auth-announcement-detail-view {
    padding: 14px;
  }
}
