/* =========================================================
   Strange Worlds - sky-fantasy portal styles
   ========================================================= */
:root {
  color-scheme: dark;

  /* Brand ink + paper */
  --ink: #060b1c;
  --paper: #f4f9ff;
  --mist: rgba(244, 249, 255, 0.86);

  /* Crystal + gold palette pulled from the emblem */
  --blue: #45d6ff;
  --blue-deep: #1f7be0;
  --aqua: #7df0ff;
  --gold: #ffd25e;
  --gold-deep: #f6a82b;
  --coral: #ff7d9b;
  --green: #65e8ac;
  --violet: #b89bff;
  --magenta: #ff8be6;

  /* Surfaces (glass) */
  --surface: rgba(14, 24, 48, 0.62);
  --surface-2: rgba(18, 30, 58, 0.72);
  --surface-strong: rgba(10, 18, 38, 0.86);
  --line: rgba(173, 214, 255, 0.22);
  --line-soft: rgba(255, 255, 255, 0.1);
  --line-gold: rgba(255, 210, 94, 0.55);

  /* Signature gradients */
  --grad-gold: linear-gradient(135deg, #fff0bf 0%, #ffd25e 42%, #f6a82b 100%);
  --grad-sky: linear-gradient(135deg, #bff3ff 0%, #45d6ff 45%, #1f7be0 100%);
  --grad-aurora: linear-gradient(120deg, #45d6ff, #b89bff 38%, #ff8be6 64%, #ffd25e);
  --grad-hero: linear-gradient(180deg, #ffffff 0%, #d4f3ff 38%, #8fd2ff 72%, #ffe6a6 100%);

  /* Radii - friendlier, varied */
  --r-xs: 10px;
  --r-sm: 14px;
  --r-md: 20px;
  --r-lg: 28px;
  --r-xl: 36px;
  --r-pill: 999px;

  /* Elevation + glow */
  --shadow-sm: 0 6px 18px rgba(2, 8, 24, 0.34);
  --shadow: 0 24px 60px rgba(2, 10, 30, 0.45);
  --shadow-lg: 0 40px 90px rgba(2, 8, 26, 0.55);
  --glow-gold: 0 0 0 1px rgba(255, 210, 94, 0.35), 0 18px 50px rgba(246, 168, 43, 0.28);
  --glow-blue: 0 0 0 1px rgba(69, 214, 255, 0.32), 0 18px 50px rgba(31, 123, 224, 0.32);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  --font: system-ui, "Segoe UI", Roboto, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Trebuchet MS", "Segoe UI Semibold", "Segoe UI", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #060a18;
  scroll-behavior: smooth;
}

body {
  position: relative;
  min-height: 100vh;
  margin: 0;
  font-family: var(--font);
  color: var(--paper);
  letter-spacing: 0.01em;
  background:
    linear-gradient(180deg, rgba(8, 16, 40, 0.16) 0%, rgba(9, 16, 36, 0.5) 46%, rgba(6, 11, 26, 0.82) 78%, rgba(5, 9, 22, 0.92) 100%),
    radial-gradient(120% 80% at 50% -8%, rgba(120, 220, 255, 0.22), transparent 56%),
    image-set(
      url("/assets/background-optimized.webp") type("image/webp"),
      url("/assets/background-optimized.jpg") type("image/jpeg")
    );
  background-attachment: fixed, fixed, fixed;
  background-size: cover, cover, cover;
  background-position: center top;
  overflow-x: hidden;
}

::selection {
  background: rgba(255, 210, 94, 0.34);
  color: #fff;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

a {
  color: inherit;
}

.hidden {
  display: none !important;
}

:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(7, 13, 30, 0.7), 0 0 0 5px rgba(69, 214, 255, 0.8);
  border-radius: var(--r-xs);
}

/* Custom scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(120, 200, 255, 0.5) transparent;
}

*::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

*::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: var(--r-pill);
  background: linear-gradient(180deg, rgba(120, 210, 255, 0.7), rgba(120, 150, 255, 0.5)) padding-box;
}

/* ---------- Background scene + atmosphere ---------- */
#world-scene {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
}

.sky-wash {
  position: fixed;
  inset: -20%;
  background:
    radial-gradient(50% 40% at 18% 12%, rgba(120, 230, 255, 0.28), transparent 60%),
    radial-gradient(45% 45% at 84% 18%, rgba(184, 155, 255, 0.26), transparent 62%),
    radial-gradient(60% 50% at 50% 108%, rgba(255, 139, 230, 0.18), transparent 60%);
  mix-blend-mode: screen;
  pointer-events: none;
  filter: blur(8px);
  animation: auroraDrift 22s ease-in-out infinite alternate;
  z-index: 1;
}

/* Decorative god-ray atmosphere injected in HTML */
.atmosphere {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.atmosphere .ray {
  position: absolute;
  top: -30%;
  width: 36vmax;
  height: 150vh;
  background: linear-gradient(180deg, rgba(255, 244, 209, 0.16), transparent 70%);
  filter: blur(14px);
  transform: rotate(14deg);
  mix-blend-mode: screen;
  animation: rayShift 16s ease-in-out infinite alternate;
}

.atmosphere .ray.r1 { left: 8%; }
.atmosphere .ray.r2 { left: 46%; animation-delay: -6s; opacity: 0.7; }
.atmosphere .ray.r3 { left: 74%; animation-delay: -11s; opacity: 0.55; }

.vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(120% 100% at 50% 28%, transparent 52%, rgba(4, 8, 20, 0.55) 100%);
}

.site-header,
main,
.site-footer,
.auth-dialog,
.preview-dialog,
.toast {
  position: relative;
  z-index: 3;
}

/* ---------- Header ---------- */
.site-header {
  width: min(1200px, calc(100% - 36px));
  margin: 0 auto;
  min-height: 120px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
}

.brand {
  grid-column: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  animation: brandFloat 6s ease-in-out infinite;
}

.brand img {
  width: clamp(300px, 40vw, 620px);
  max-height: 148px;
  object-fit: contain;
  filter: drop-shadow(0 10px 26px rgba(0, 60, 140, 0.5)) drop-shadow(0 0 18px rgba(120, 220, 255, 0.25));
}

.header-actions {
  grid-column: 3;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* ---------- Buttons ---------- */
.icon-button,
.large-action {
  position: relative;
  isolation: isolate;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--paper);
  font-family: var(--font-display);
  letter-spacing: 0.02em;
  text-decoration: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0)) padding-box,
    var(--surface-2) padding-box;
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, 0.14);
  overflow: hidden;
  transition: transform 220ms var(--ease-spring), border-color 220ms var(--ease),
    box-shadow 220ms var(--ease), background 220ms var(--ease);
}

.icon-button {
  padding: 0 18px;
  font-weight: 700;
  font-size: 15px;
}

.large-action {
  padding: 0 26px;
  min-height: 56px;
  font-weight: 700;
  font-size: 17px;
}

/* Glint sweep on hover */
.icon-button::after,
.large-action::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 38%, rgba(255, 255, 255, 0.45) 50%, transparent 62%);
  transform: translateX(-130%);
  transition: transform 620ms var(--ease);
  z-index: 2;
  pointer-events: none;
}

.icon-button:hover::after,
.icon-button:focus-visible::after,
.large-action:hover::after,
.large-action:focus-visible::after {
  transform: translateX(130%);
}

.icon {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: var(--r-pill);
  color: var(--ink);
  background: var(--grad-gold);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 4px 10px rgba(246, 168, 43, 0.4);
  flex: 0 0 auto;
}

.icon svg {
  width: 16px;
  height: 16px;
}

.primary {
  color: #07101f;
  border-color: rgba(255, 230, 160, 0.7);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0)) padding-box,
    var(--grad-gold) padding-box;
  box-shadow: var(--glow-gold), inset 0 1px 0 rgba(255, 255, 255, 0.7);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
}

.primary .icon {
  background: rgba(6, 16, 31, 0.92);
  color: #ffe9a6;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.ghost {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0)) padding-box,
    var(--surface) padding-box;
}

.ghost:hover,
.ghost:focus-visible,
.icon-button:hover,
.icon-button:focus-visible,
.large-action:hover,
.large-action:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.6);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.primary:hover,
.primary:focus-visible {
  box-shadow: 0 0 0 1px rgba(255, 230, 160, 0.8), 0 22px 54px rgba(246, 168, 43, 0.5);
}

.gold {
  border-color: var(--line-gold);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0)) padding-box,
    linear-gradient(135deg, rgba(255, 210, 94, 0.3), rgba(255, 125, 155, 0.22)) padding-box;
}

/* Discord brand CTA */
.discord {
  border-color: rgba(88, 101, 242, 0.65);
  color: #fff;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0)) padding-box,
    linear-gradient(180deg, #5865f2, #4453c8) padding-box;
  box-shadow: 0 14px 30px rgba(88, 101, 242, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.discord .icon {
  background: rgba(255, 255, 255, 0.94);
  color: #5865f2;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 4px 10px rgba(40, 50, 140, 0.4);
}

.discord:hover,
.discord:focus-visible {
  border-color: rgba(150, 160, 255, 0.85);
  box-shadow: 0 0 0 1px rgba(150, 160, 255, 0.7), 0 22px 50px rgba(88, 101, 242, 0.5);
}

/* ---------- Layout shell ---------- */
main {
  width: min(1200px, calc(100% - 36px));
  margin: 0 auto 72px;
}

.site-footer {
  width: min(1200px, calc(100% - 36px));
  margin: -34px auto 34px;
  padding: 10px 0 18px;
  text-align: center;
  color: rgba(236, 246, 255, 0.38);
  font-family: "Inter", system-ui, sans-serif;
  font-size: 11px;
  line-height: 1.5;
  letter-spacing: 0;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.38);
}

.site-footer p {
  margin: 0;
}

/* ---------- Hero ---------- */
.hero-shell {
  position: relative;
  min-height: min(720px, calc(100vh - 150px));
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(330px, 440px);
  align-items: center;
  gap: 44px;
  padding: 18px 0 56px;
}

.hero-copy {
  position: relative;
  z-index: 0;
  padding: 40px 0;
}

.hero-copy::before {
  content: "";
  position: absolute;
  inset: -6% -12% -6% -16%;
  background: radial-gradient(70% 80% at 30% 50%, rgba(5, 11, 28, 0.62), transparent 72%);
  filter: blur(6px);
  z-index: -2;
}

.hero-copy::after {
  content: "";
  position: absolute;
  left: clamp(-96px, -7vw, -44px);
  top: clamp(-54px, -5vw, -24px);
  width: clamp(190px, 20vw, 310px);
  aspect-ratio: 1;
  z-index: -1;
  background: url("/assets/hero-pet.png") center / contain no-repeat;
  opacity: 0.42;
  filter: drop-shadow(0 22px 34px rgba(0, 8, 24, 0.72));
  transform: rotate(-7deg);
  pointer-events: none;
}

.hero-copy > * {
  position: relative;
  z-index: 1;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 20px;
  padding: 7px 16px 7px 13px;
  border: 1px solid var(--line-gold);
  border-radius: var(--r-pill);
  color: var(--gold);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  background: rgba(255, 210, 94, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 8px 22px rgba(2, 10, 28, 0.35);
}

.hero-eyebrow svg {
  width: 15px;
  height: 15px;
  filter: drop-shadow(0 0 6px rgba(255, 200, 80, 0.6));
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 700;
}

h1 {
  margin-bottom: 16px;
  padding-bottom: 0.12em;
  font-size: clamp(48px, 7vw, 84px);
  line-height: 1.06;
  letter-spacing: -0.01em;
  background: var(--grad-hero);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 6px 22px rgba(0, 50, 120, 0.5));
}

.hero-copy p {
  max-width: 560px;
  margin-bottom: 30px;
  color: rgba(238, 247, 255, 0.94);
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.6;
  text-shadow: 0 2px 16px rgba(2, 10, 28, 0.7);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

/* ---------- Hero spotlight stack ---------- */
.portal-orbit {
  display: grid;
  gap: 14px;
  perspective: 1200px;
}

.spotlight-card {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: linear-gradient(135deg, rgba(22, 36, 70, 0.78), rgba(10, 18, 40, 0.66));
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(16px);
  overflow: hidden;
  rotate: -0.6deg;
  animation: floatY 6s var(--ease) infinite;
  transition: transform 280ms var(--ease-spring), box-shadow 280ms var(--ease), border-color 280ms var(--ease);
}

.spotlight-card:nth-child(2) {
  margin-left: 26px;
  rotate: 0.4deg;
  animation-delay: 0.6s;
}

.spotlight-card:nth-child(3) {
  margin-left: 52px;
  rotate: -0.3deg;
  animation-delay: 1.2s;
}

.spotlight-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--grad-aurora);
  background-size: 100% 300%;
  animation: borderFlow 7s linear infinite;
}

.spotlight-card:hover {
  transform: scale(1.02);
  border-color: var(--line-gold);
  box-shadow: var(--glow-blue);
}

.spotlight-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: var(--r-md);
  color: #06121f;
  background: var(--grad-gold);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 8px 18px rgba(246, 168, 43, 0.36);
}

.spotlight-icon svg {
  width: 24px;
  height: 24px;
}

.spotlight-card strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 21px;
  color: #fff;
  letter-spacing: 0.01em;
}

.spotlight-card p {
  margin: 3px 0 0;
  font-size: 13.5px;
  line-height: 1.4;
  color: rgba(214, 232, 255, 0.82);
}

.beta-flag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  justify-self: start;
  margin-left: 6px;
  padding: 9px 16px;
  border: 1px solid rgba(101, 232, 172, 0.45);
  border-radius: var(--r-pill);
  background: rgba(20, 48, 44, 0.6);
  color: #c8ffe6;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
}

.beta-flag .pulse {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(101, 232, 172, 0.7);
  animation: pulseDot 2s ease-out infinite;
}

/* ---------- Guest preview: Features in Motion ---------- */
.guest-experience {
  margin: 8px 0 72px;
}

.preview-section-heading {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  margin: clamp(18px, 3vw, 42px) auto clamp(4px, 1.4vw, 16px);
  pointer-events: none;
}

.preview-section-heading img {
  display: block;
  width: min(58vw, 560px);
  height: auto;
  filter:
    drop-shadow(0 18px 26px rgba(0, 8, 24, 0.58))
    drop-shadow(0 0 20px rgba(255, 198, 64, 0.16));
}

.layer-showcase {
  --layer-count: 28;
  position: relative;
  min-height: 0;
  padding-top: clamp(58px, 7vw, 96px);
  overflow: visible;
}

.layer-viewport {
  position: relative;
  display: grid;
  gap: clamp(54px, 8vw, 104px);
  height: auto;
  min-height: 0;
  overflow: visible;
  perspective: none;
  transform-style: flat;
}

.layer-viewport::before {
  content: "";
  position: absolute;
  top: clamp(38px, 5vw, 72px);
  bottom: -2%;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  background:
    linear-gradient(90deg, transparent 49.85%, rgba(255, 217, 130, 0.22) 50%, transparent 50.15%),
    radial-gradient(58% 22% at 50% 0%, rgba(69, 214, 255, 0.13), transparent 72%),
    radial-gradient(48% 20% at 50% 100%, rgba(255, 139, 230, 0.08), transparent 74%);
  filter: blur(0);
  pointer-events: none;
}

.preview-layer {
  --title-slide-x: clamp(72px, 11vw, 156px);
  position: relative;
  display: grid;
  grid-template-columns: minmax(240px, 0.82fr) minmax(420px, 1.18fr);
  align-items: center;
  gap: clamp(28px, 5vw, 76px);
  width: min(92vw, 1260px);
  min-height: auto;
  margin: 0 auto;
  opacity: 1;
  transform: none;
  transform-style: flat;
  transition: filter 260ms var(--ease), opacity 260ms var(--ease);
  will-change: auto;
  pointer-events: auto;
}

.preview-layer.is-active {
  filter: saturate(1.08);
  pointer-events: auto;
}

.preview-layer:nth-of-type(even) {
  --title-slide-x: clamp(-156px, -11vw, -72px);
  grid-template-columns: minmax(420px, 1.18fr) minmax(240px, 0.82fr);
}

.preview-layer:nth-of-type(even) .layer-title {
  order: 2;
}

.preview-layer:nth-of-type(even) .layer-media {
  order: 1;
}

.layer-media {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  padding: 0;
  overflow: visible;
  border: 1px solid rgba(150, 190, 255, 0.22);
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(18, 32, 62, 0.72), rgba(3, 8, 18, 0.86));
  box-shadow: 0 42px 92px rgba(2, 8, 22, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: transform 300ms var(--ease), box-shadow 300ms var(--ease), border-color 300ms var(--ease), filter 300ms var(--ease);
}

.preview-layer.is-active .layer-media {
  border-color: rgba(150, 190, 255, 0.34);
  box-shadow: var(--glow-blue), 0 50px 116px rgba(2, 8, 22, 0.66);
}

.preview-layer.is-active .layer-media:hover {
  transform: translateY(-5px) scale(1.012);
}

.layer-media::after {
  content: "";
  position: absolute;
  inset: -10.5% -8.8%;
  z-index: 4;
  background: url("/assets/showcase/frame.webp") center / 100% 100% no-repeat;
  filter: drop-shadow(0 18px 28px rgba(0, 9, 28, 0.55));
  pointer-events: none;
}

.layer-media::before {
  content: "";
  position: absolute;
  inset: 1px;
  z-index: 3;
  border-radius: inherit;
  background: linear-gradient(115deg, transparent 38%, rgba(255, 255, 255, 0.18) 50%, transparent 62%);
  transform: translateX(-135%);
  transition: transform 850ms var(--ease);
  pointer-events: none;
}

.preview-layer.is-active .layer-media:hover::before {
  transform: translateX(135%);
}

.layer-media img,
.layer-media video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  border-radius: inherit;
  background: rgba(2, 7, 15, 0.55);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.layer-title {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  padding: clamp(24px, 3.2vw, 42px);
  border: 1px solid rgba(255, 217, 130, 0.22);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(255, 218, 132, 0.14), transparent 34%),
    linear-gradient(160deg, rgba(9, 21, 44, 0.78), rgba(3, 8, 18, 0.58));
  box-shadow: 0 26px 62px rgba(2, 8, 22, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
  opacity: 0;
  filter: blur(7px);
  transform: translateX(var(--title-slide-x)) scale(0.96);
  transition:
    opacity 620ms var(--ease),
    filter 620ms var(--ease),
    transform 720ms var(--ease-spring),
    border-color 280ms var(--ease);
  pointer-events: none;
}

.preview-layer.is-revealed .layer-title {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0);
}

.preview-layer.is-active .layer-title {
  border-color: rgba(255, 217, 130, 0.42);
}

.layer-title span {
  font-family: var(--font-display);
  color: var(--gold);
  font-size: clamp(13px, 1.2vw, 17px);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-shadow: 0 4px 14px rgba(0, 8, 24, 0.75);
}

.layer-title h3 {
  margin: 0;
  font-size: clamp(34px, 5vw, 72px);
  line-height: 0.95;
  color: #fff;
  text-shadow: 0 8px 26px rgba(0, 8, 24, 0.75);
}

.layer-title p {
  margin: 0;
  max-width: 31ch;
  color: rgba(237, 246, 255, 0.78);
  font-size: clamp(15px, 1.5vw, 18px);
  line-height: 1.6;
}

.layer-dots {
  display: none;
  position: absolute;
  left: 50%;
  bottom: 8px;
  z-index: 240;
  align-items: flex-end;
  gap: 6px;
  padding: 10px 16px;
  border-radius: var(--r-pill);
  background: rgba(8, 16, 34, 0.46);
  border: 1px solid var(--line);
  box-shadow: 0 14px 34px rgba(2, 8, 22, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  transform: translateX(-50%);
}

.layer-dots button {
  width: 7px;
  height: 11px;
  padding: 0;
  border: none;
  border-radius: var(--r-pill);
  background: rgba(180, 210, 255, 0.28);
  transition: background 220ms var(--ease), height 220ms var(--ease-spring), box-shadow 220ms var(--ease);
}

.layer-dots button:hover {
  background: rgba(180, 210, 255, 0.6);
  height: 16px;
}

.layer-dots button.is-active {
  height: 22px;
  background: var(--grad-gold);
  box-shadow: 0 0 14px rgba(255, 200, 80, 0.7);
}

.bottom-actions {
  width: min(100% - 32px, 1180px);
  margin: 10px auto 48px;
  display: flex;
  justify-content: center;
}

.go-up-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid rgba(255, 217, 130, 0.38);
  border-radius: var(--r-pill);
  color: #08111f;
  background: var(--grad-gold);
  box-shadow: 0 16px 38px rgba(2, 8, 22, 0.36), 0 0 24px rgba(255, 205, 98, 0.22);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 220ms var(--ease), box-shadow 220ms var(--ease);
}

.go-up-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 44px rgba(2, 8, 22, 0.42), 0 0 34px rgba(255, 205, 98, 0.34);
}

.go-up-button .icon {
  width: 18px;
  height: 18px;
  transform: rotate(-90deg);
}

/* ---------- Dashboard ---------- */
.dashboard {
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(69, 214, 255, 0.12), transparent 55%),
    linear-gradient(160deg, rgba(20, 34, 66, 0.66), rgba(6, 12, 26, 0.82));
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.dashboard-top {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  padding: 5px 12px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-gold);
  background: rgba(255, 210, 94, 0.12);
  color: var(--gold);
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 11px;
}

.dashboard h2 {
  margin-bottom: 0;
  font-size: clamp(26px, 3vw, 36px);
}

.balance-strip {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.balance-strip div {
  position: relative;
  min-width: 156px;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.03));
  overflow: hidden;
}

.balance-strip div::before {
  content: "";
  position: absolute;
  right: -20px;
  top: -20px;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 210, 94, 0.3), transparent 70%);
}

.balance-strip span,
.account-facts dt {
  display: block;
  color: rgba(206, 226, 255, 0.66);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.balance-strip strong {
  display: block;
  margin-top: 6px;
  font-family: var(--font-display);
  font-weight: 700;
  background: var(--grad-gold);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: 30px;
}

.panel-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 18px;
}

.portal-card {
  position: relative;
  padding: 24px;
  min-height: 240px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: linear-gradient(160deg, rgba(22, 36, 70, 0.6), rgba(8, 15, 32, 0.72));
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
  overflow: hidden;
  transition: transform 280ms var(--ease), border-color 280ms var(--ease), box-shadow 280ms var(--ease);
}

.portal-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--grad-aurora);
  background-size: 300% 100%;
  opacity: 0.7;
  animation: borderFlow 9s linear infinite;
}

.portal-card:hover {
  transform: translateY(-4px);
  border-color: var(--line-gold);
  box-shadow: var(--glow-blue);
}

.account-card,
.game-card {
  grid-column: span 6;
}

.vote-card,
.donate-card,
.download-card {
  grid-column: span 4;
}

.transfer-card {
  grid-column: span 8;
}

/* ---------- Beta access banner ---------- */
.beta-card {
  grid-column: span 12;
  min-height: 0;
}

.beta-locked {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(290px, 0.72fr);
  align-items: center;
  gap: 28px;
}

.beta-headline {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.beta-headline > .glyph {
  flex: 0 0 auto;
}

.beta-headline h3,
.beta-active-copy h3 {
  margin: 8px 0;
  font-size: clamp(21px, 2.3vw, 29px);
}

.beta-headline p,
.beta-active-copy p {
  margin: 0;
  max-width: 54ch;
  color: rgba(220, 234, 255, 0.82);
  line-height: 1.55;
}

.beta-card .beta-form {
  margin: 0;
}

.beta-active-state {
  display: none;
  align-items: center;
  gap: 18px;
}

.beta-active-copy {
  flex: 1 1 auto;
}

.beta-active-state .beta-flag {
  flex: 0 0 auto;
  margin: 0;
}

.glyph-ok {
  border-color: rgba(101, 232, 172, 0.6);
  color: #06231a;
  background: linear-gradient(135deg, #8affc6, #43d6a0);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 8px 18px rgba(67, 214, 160, 0.35);
}

.dashboard.beta-active .beta-locked {
  display: none;
}

.dashboard.beta-active .beta-active-state {
  display: flex;
}

.locked-hint {
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px dashed var(--line-gold);
  border-radius: var(--r-sm);
  background: rgba(255, 210, 94, 0.06);
  color: rgba(230, 240, 255, 0.82);
  font-size: 14px;
}

.dashboard.beta-active .locked-hint {
  display: none;
}

.vote-intro {
  margin: -2px 0 16px;
  color: rgba(220, 234, 255, 0.82);
  font-size: 14px;
  line-height: 1.5;
}

.vote-intro strong {
  color: var(--gold);
}

.card-title {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 20px;
}

.card-title h3 {
  margin: 0;
  font-size: 22px;
}

.glyph {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line-gold);
  border-radius: var(--r-md);
  color: #07121f;
  background: var(--grad-gold);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 8px 18px rgba(246, 168, 43, 0.3);
}

.glyph svg {
  width: 22px;
  height: 22px;
}

.account-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 20px;
}

.account-facts div {
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.06);
  min-width: 0;
}

.account-facts dd {
  margin: 7px 0 0;
  overflow-wrap: anywhere;
  font-weight: 700;
  color: #fff;
}

.stack-form,
.auth-form,
.beta-form {
  display: grid;
  gap: 14px;
}

.beta-form {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  margin-bottom: 16px;
}

label span {
  display: block;
  margin-bottom: 7px;
  color: rgba(214, 232, 255, 0.78);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

input,
select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 0 14px;
  color: var(--paper);
  background: rgba(5, 11, 24, 0.72);
  outline: none;
  transition: border-color 200ms var(--ease), box-shadow 200ms var(--ease), background 200ms var(--ease);
}

input::placeholder {
  color: rgba(200, 218, 245, 0.4);
}

select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(255, 210, 94, 0.92) 50%),
    linear-gradient(135deg, rgba(255, 210, 94, 0.92) 50%, transparent 50%);
  background-position:
    calc(100% - 20px) 50%,
    calc(100% - 14px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

input:focus,
select:focus {
  border-color: var(--blue);
  background: rgba(7, 15, 30, 0.85);
  box-shadow: 0 0 0 3px rgba(69, 214, 255, 0.22), 0 8px 22px rgba(31, 123, 224, 0.22);
}

.stack-form[aria-disabled="true"] {
  opacity: 0.55;
}

.locked-zone[aria-disabled="true"] {
  opacity: 0.5;
  pointer-events: none;
  filter: saturate(0.6);
}

.account-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.account-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-sm);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
  transition: transform 200ms var(--ease), border-color 200ms var(--ease);
}

.account-pill:hover {
  transform: translateX(4px);
  border-color: var(--line-gold);
}

.account-pill strong {
  overflow-wrap: anywhere;
  color: #fff;
}

.account-pill span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.account-pill span svg {
  width: 14px;
  height: 14px;
}

.vote-sites {
  display: grid;
  gap: 14px;
}

.vote-site {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.03));
  padding: 18px;
  overflow: hidden;
}

.vote-site::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--site-accent, var(--gold));
  box-shadow: 0 0 16px var(--site-accent, var(--gold));
}

.vote-site header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.vote-site strong {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
}

.cooldown {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(224, 238, 255, 0.78);
  font-size: 12px;
  font-weight: 600;
}

.vote-site.is-pending .cooldown {
  background: color-mix(in srgb, var(--site-accent, var(--gold)) 18%, transparent);
  color: var(--site-accent, var(--gold));
  animation: votePending 1.5s ease-in-out infinite;
}

@keyframes votePending {
  0%, 100% { opacity: 0.62; }
  50% { opacity: 1; }
}

.vote-site .icon-button {
  width: 100%;
}

.vote-site .icon-button + .icon-button {
  margin-top: 10px;
}

.transfer-history {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.transfer-row,
.transfer-empty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.045);
}

.transfer-row strong {
  display: block;
  color: #fff;
}

.transfer-row span {
  display: block;
  margin-top: 3px;
  color: rgba(220, 234, 255, 0.62);
  font-size: 12px;
}

.transfer-meta {
  display: grid;
  justify-items: end;
  gap: 3px;
}

.transfer-meta b {
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 18px;
}

.transfer-meta em {
  padding: 2px 9px;
  border-radius: var(--r-pill);
  color: rgba(220, 234, 255, 0.76);
  background: rgba(255, 255, 255, 0.07);
  font-style: normal;
  font-size: 12px;
  font-weight: 700;
}

.transfer-completed .transfer-meta em {
  color: var(--green);
  background: rgba(101, 232, 172, 0.14);
}

.transfer-failed .transfer-meta em {
  color: var(--coral);
  background: rgba(255, 125, 155, 0.14);
}

.transfer-empty {
  justify-content: center;
  color: rgba(220, 234, 255, 0.55);
  font-size: 13.5px;
}

.donate-stage,
.download-lock {
  display: grid;
  gap: 10px;
  padding: 22px;
  border: 1px dashed var(--line-gold);
  border-radius: var(--r-md);
  background: rgba(255, 210, 94, 0.06);
  color: rgba(230, 240, 255, 0.8);
}

.donate-stage strong {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--gold);
  font-size: 24px;
}

.download-card .icon-button {
  width: 100%;
  margin-top: 16px;
}

/* ---------- Dialogs ---------- */
.auth-dialog,
.preview-dialog {
  border: 1px solid var(--line-gold);
  border-radius: var(--r-xl);
  color: var(--paper);
  background:
    radial-gradient(120% 70% at 50% 0%, rgba(69, 214, 255, 0.14), transparent 60%),
    linear-gradient(165deg, rgba(20, 32, 64, 0.96), rgba(7, 13, 28, 0.97));
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(22px);
}

.auth-dialog[open],
.preview-dialog[open] {
  animation: dialogPop 320ms var(--ease-spring);
}

.preview-dialog[open] {
  animation: previewDialogFade 220ms var(--ease);
}

.auth-dialog::backdrop,
.preview-dialog::backdrop {
  background: rgba(2, 6, 16, 0.66);
  backdrop-filter: blur(8px);
}

.auth-dialog {
  width: min(490px, calc(100vw - 32px));
  padding: 28px;
}

.dialog-close-form {
  display: flex;
  justify-content: flex-end;
  margin: -10px -10px 6px;
}

.round-close {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  color: var(--paper);
  background: rgba(255, 255, 255, 0.08);
  font-size: 24px;
  line-height: 1;
  transition: transform 200ms var(--ease-spring), background 200ms var(--ease), color 200ms var(--ease);
}

.round-close:hover {
  transform: rotate(90deg);
  background: var(--coral);
  color: #fff;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 22px;
  padding: 5px;
  border-radius: var(--r-pill);
  background: rgba(5, 11, 24, 0.6);
  border: 1px solid var(--line-soft);
}

.tab-button {
  min-height: 44px;
  border: 0;
  border-radius: var(--r-pill);
  color: rgba(224, 238, 255, 0.78);
  background: transparent;
  font-family: var(--font-display);
  font-weight: 700;
  transition: color 220ms var(--ease), background 220ms var(--ease), box-shadow 220ms var(--ease);
}

.tab-button.active {
  color: #07121f;
  background: var(--grad-gold);
  box-shadow: 0 8px 20px rgba(246, 168, 43, 0.34);
}

.preview-dialog {
  position: fixed;
  top: 50%;
  left: 50%;
  width: min(1140px, calc(100vw - 28px));
  max-height: calc(100dvh - 28px);
  margin: 0;
  padding: 14px;
  overflow: auto;
  transform: translate(-50%, -50%);
}

.preview-dialog form {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 8px;
}

.preview-dialog [hidden] {
  display: none !important;
}

.preview-dialog img,
.preview-dialog video {
  display: block;
  width: 100%;
  max-height: calc(100dvh - 120px);
  object-fit: contain;
  border-radius: var(--r-lg);
  background: rgba(2, 7, 15, 0.82);
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 2147483647;
  isolation: isolate;
  transform: translate(-50%, 140px);
  display: flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  max-width: min(520px, calc(100vw - 32px));
  padding: 15px 22px;
  border: 1px solid var(--line-gold);
  border-radius: var(--r-pill);
  color: var(--paper);
  font-weight: 600;
  background: linear-gradient(135deg, rgba(20, 34, 66, 0.96), rgba(8, 15, 30, 0.96));
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transition: transform 320ms var(--ease-spring), opacity 280ms var(--ease);
}

.toast::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 12px rgba(101, 232, 172, 0.9);
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- Keyframes ---------- */
@keyframes ribbonFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

@keyframes floatY {
  0%, 100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -7px;
  }
}

@keyframes brandFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes pulseDot {
  0% {
    box-shadow: 0 0 0 0 rgba(101, 232, 172, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(101, 232, 172, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(101, 232, 172, 0);
  }
}

@keyframes dialogPop {
  0% {
    opacity: 0;
    transform: translateY(16px) scale(0.96);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes previewDialogFade {
  0% {
    opacity: 0;
    transform: translate(-50%, -48%) scale(0.985);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes auroraDrift {
  0% {
    transform: translate3d(-2%, -1%, 0) scale(1.05);
  }
  100% {
    transform: translate3d(2%, 2%, 0) scale(1.15);
  }
}

@keyframes rayShift {
  0% {
    opacity: 0.5;
    transform: rotate(14deg) translateY(-2%);
  }
  100% {
    opacity: 0.9;
    transform: rotate(10deg) translateY(2%);
  }
}

@keyframes borderFlow {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 300% 50%;
  }
}

/* =========================================================
   Admin console (operator-only, server-gated)
   ========================================================= */
.admin-panel {
  margin: 26px 0 4px;
}

.admin-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.admin-head h2 {
  margin: 2px 0 0;
  font-size: clamp(22px, 2.4vw, 30px);
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 18px;
}

.admin-card {
  min-height: 0;
}

.admin-accounts-card {
  grid-column: span 12;
}

.admin-keys-card {
  grid-column: span 6;
}

.admin-votes-card {
  grid-column: span 6;
}

.admin-count {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 22px;
  padding: 0 8px;
  margin-left: 6px;
  border-radius: var(--r-pill);
  background: rgba(69, 214, 255, 0.16);
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 700;
  color: var(--aqua);
  vertical-align: middle;
}

.admin-inline-btn {
  margin-left: auto;
  padding: 8px 14px;
  font-size: 13px;
}

.admin-table-wrap {
  max-height: clamp(320px, 46vh, 560px);
  overflow: auto;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-soft);
  background: rgba(4, 10, 22, 0.28);
  scrollbar-color: rgba(255, 217, 130, 0.55) rgba(8, 16, 34, 0.72);
  scrollbar-width: thin;
}

.admin-table-wrap::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.admin-table-wrap::-webkit-scrollbar-track {
  background: rgba(8, 16, 34, 0.72);
  border-radius: var(--r-pill);
}

.admin-table-wrap::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(255, 217, 130, 0.82), rgba(69, 214, 255, 0.58));
  border: 2px solid rgba(8, 16, 34, 0.72);
  border-radius: var(--r-pill);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  white-space: nowrap;
}

.admin-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  text-align: left;
  padding: 11px 14px;
  background: var(--surface-strong);
  color: rgba(220, 234, 255, 0.7);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--line);
}

.admin-table tbody td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line-soft);
  color: rgba(230, 240, 255, 0.9);
}

.admin-table tbody tr:hover td {
  background: rgba(69, 214, 255, 0.06);
}

.admin-user {
  font-weight: 700;
  color: var(--paper);
}

.admin-email {
  color: rgba(220, 234, 255, 0.66);
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-date {
  color: rgba(220, 234, 255, 0.6);
  font-variant-numeric: tabular-nums;
}

.admin-tag {
  display: inline-block;
  padding: 1px 7px;
  border-radius: var(--r-pill);
  background: var(--grad-gold);
  color: var(--ink);
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  vertical-align: middle;
}

.admin-badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line-soft);
  color: rgba(220, 234, 255, 0.7);
  font-size: 12px;
  font-weight: 600;
}

.admin-badge.ok {
  background: rgba(101, 232, 172, 0.16);
  border-color: rgba(101, 232, 172, 0.45);
  color: var(--green);
}

.admin-mini-btn {
  padding: 6px 12px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--mist);
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 200ms var(--ease), color 200ms var(--ease), background 200ms var(--ease);
}

.admin-mini-btn:hover,
.admin-mini-btn:focus-visible {
  border-color: var(--line-gold);
  color: var(--paper);
  background: rgba(255, 210, 94, 0.12);
}

.admin-subhead {
  margin: 16px 0 8px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(220, 234, 255, 0.6);
}

.admin-subhead:first-of-type {
  margin-top: 4px;
}

.admin-key-list {
  display: grid;
  gap: 8px;
}

.admin-key {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.03);
}

.admin-key code {
  font-family: "Cascadia Code", "Consolas", ui-monospace, monospace;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--aqua);
  letter-spacing: 0.02em;
}

.admin-key.redeemed code {
  color: rgba(220, 234, 255, 0.7);
}

.admin-key-by {
  font-weight: 600;
  color: var(--mist);
}

.admin-key .admin-date {
  margin-left: auto;
  font-size: 12px;
}

.admin-vote-list {
  display: grid;
  gap: 7px;
  max-height: 360px;
  overflow-y: auto;
}

.admin-vote-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.03);
}

.admin-site {
  padding: 1px 9px;
  border-radius: var(--r-pill);
  background: rgba(69, 214, 255, 0.14);
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 600;
  color: var(--aqua);
}

.admin-vote-row .admin-date {
  margin-left: auto;
  font-size: 12px;
}

.admin-empty {
  padding: 14px;
  color: rgba(220, 234, 255, 0.55);
  font-size: 13.5px;
  text-align: center;
}

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

@media (max-width: 980px) {
  .admin-keys-card,
  .admin-votes-card {
    grid-column: span 12;
  }
}

@media (max-width: 980px) {
  .site-header {
    grid-template-columns: 1fr;
    justify-items: center;
    padding-top: 10px;
  }

  .brand,
  .header-actions {
    grid-column: 1;
    justify-self: center;
  }

  .hero-shell {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .portal-orbit {
    grid-template-columns: 1fr;
  }

  .spotlight-card,
  .spotlight-card:nth-child(2),
  .spotlight-card:nth-child(3) {
    margin-left: 0;
    rotate: 0deg;
  }

  .beta-flag {
    margin-left: 0;
  }

  .panel-grid {
    grid-template-columns: 1fr;
  }

  .layer-showcase {
    min-height: 0;
  }

  .layer-viewport {
    gap: 56px;
    height: auto;
    min-height: 0;
  }

  .preview-layer {
    --title-slide-x: 0;
    grid-template-columns: 1fr;
    gap: 22px;
    width: min(92vw, 760px);
    min-height: min(72vh, 620px);
  }

  .preview-layer:nth-of-type(even) {
    --title-slide-x: 0;
    grid-template-columns: 1fr;
  }

  .preview-layer:nth-of-type(even) .layer-title,
  .preview-layer:nth-of-type(even) .layer-media {
    order: initial;
  }

  .layer-title {
    padding: 24px;
    transform: translateY(24px) scale(0.96);
  }

  .preview-layer.is-revealed .layer-title {
    transform: translateY(0);
  }

  .layer-dots {
    display: none;
  }

  .layer-dots button {
    width: 6px;
  }

  .account-card,
  .game-card,
  .transfer-card,
  .vote-card,
  .donate-card,
  .download-card,
  .beta-card {
    grid-column: 1;
  }

  .beta-locked {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .beta-active-state {
    flex-wrap: wrap;
  }
}

@media (max-width: 620px) {
  main,
  .site-header {
    width: min(100% - 20px, 1180px);
  }

  .brand img {
    width: min(100%, 420px);
  }

  .header-actions,
  .hero-actions,
  .beta-form,
  .dashboard-top,
  .balance-strip {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .icon-button,
  .large-action {
    width: 100%;
  }

  .hero-copy,
  .dashboard,
  .portal-card {
    padding: 20px;
  }

  .hero-copy::after {
    left: auto;
    right: -34px;
    top: -38px;
    width: min(42vw, 180px);
    opacity: 0.28;
  }

  .preview-section-heading img {
    width: min(82vw, 360px);
  }

  .layer-viewport {
    gap: 42px;
    min-height: 0;
  }

  .preview-layer {
    width: min(94vw, 560px);
    min-height: min(72vh, 560px);
    gap: 16px;
  }

  .layer-title {
    padding: 18px;
  }

  .layer-title h3 {
    font-size: clamp(28px, 10vw, 44px);
  }

  .layer-title p {
    font-size: 14px;
    line-height: 1.45;
  }

  .layer-dots {
    display: none;
  }

  .layer-dots button {
    width: 5px;
  }

  .hero-copy p {
    font-size: 16px;
  }

  .account-facts {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .sky-wash,
  .atmosphere {
    display: none;
  }

  .layer-title {
    opacity: 1;
    filter: none;
    transform: none;
  }
}
