* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
  padding: 0;
  background: transparent;
  color: #fff;
  font-family: system-ui, -apple-system, sans-serif;
  scroll-behavior: smooth;
}

html {
  background:
    linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.3));
  background-color: #202124;
  overscroll-behavior-y: none;
}

html.prototype-pages {
  background-color: #202124;
  background-image: none;
}

body.background-page {
  background:
    linear-gradient(to bottom, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.42)),
}

body.prototype-page {
  overflow-x: clip;
  overscroll-behavior-y: none;
  display: flex;
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  flex-direction: column;
}

.prototype-shell {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  margin-top: auto;
}

.auth-page > main { max-width: 38rem; display: flex !important; flex-direction: column; justify-content: center; }
.auth-page > main > section { max-width: 38rem; width: 100%; margin-top: 1rem; padding: clamp(1.5rem, 5vw, 3rem); position: relative; border: 1px solid rgba(242, 202, 80, 0.16); background: rgba(17, 17, 18, 0.52); box-shadow: 0 28px 100px rgba(0, 0, 0, 0.38), inset 0 1px 1px rgba(255, 255, 255, 0.14); }
.auth-page > main > section::before { content: ""; position: absolute; top: 0; left: 18%; right: 18%; height: 1px; background: linear-gradient(90deg, transparent, rgba(242, 202, 80, 0.9), transparent); }
.auth-page .auth-field { display: grid; gap: 0.55rem; }
.auth-page label { color: rgba(255, 255, 255, 0.62); font-family: Rajdhani, system-ui, sans-serif; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.auth-page input { width: 100%; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 0.75rem; background: rgba(0, 0, 0, 0.34); color: #fff; font-family: Rajdhani, system-ui, sans-serif; font-size: 1rem; outline: none; padding: 0.95rem 1rem; transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease; }
.auth-page input::placeholder { color: rgba(255, 255, 255, 0.3); }
.auth-page input:hover { border-color: rgba(255, 255, 255, 0.24); }
.auth-page input:focus { border-color: #f2ca50; background: rgba(0, 0, 0, 0.48); box-shadow: 0 0 0 3px rgba(242, 202, 80, 0.14), 0 0 24px rgba(242, 202, 80, 0.08); }
.auth-page .auth-submit { min-height: 3.25rem; border: 0; border-radius: 0.75rem; background: #f2ca50; box-shadow: 0 0 24px rgba(242, 202, 80, 0.2); color: #3c2f00; cursor: pointer; font-family: Rajdhani, system-ui, sans-serif; font-size: 0.9rem; font-weight: 700; letter-spacing: 0.16em; padding: 1rem; position: relative; overflow: hidden; text-transform: uppercase; transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease; width: 100%; }
.auth-page .auth-submit::after { content: ""; position: absolute; top: -80%; left: -30%; width: 28%; height: 260%; background: rgba(255, 255, 255, 0.35); transform: rotate(24deg); transition: left 0.5s ease; }
.auth-page .auth-submit:hover { background: #ffe088; box-shadow: 0 0 34px rgba(242, 202, 80, 0.34); }
.auth-page .auth-submit:hover::after { left: 110%; }
.auth-page .auth-submit:active { transform: scale(0.99); }
.auth-page a { transition: color 0.2s ease; }

#toast-value {
  margin-left: 0.35em;
  font-family: "Press Start 2P", monospace;
  font-size: 10px;
  letter-spacing: 0;
}

.prototype-page > .fixed.inset-0,
.prototype-page > header,
.prototype-page > footer,
.prototype-page > nav#mobile-dock {
  display: none;
}

.site-backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: transparent;
  overflow: hidden;
}

.liquid-glass,
.liquid-glass-strong {
  background: rgba(255, 255, 255, 0.035);
  background-blend-mode: luminosity;
  border: none;
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.18), inset 0 1px 1px rgba(255, 255, 255, 0.13);
  overflow: hidden;
  position: relative;
}

.liquid-glass {
  -webkit-backdrop-filter: blur(18px) saturate(1.08);
  backdrop-filter: blur(18px) saturate(1.08);
}

.liquid-glass-strong {
  background: rgba(255, 255, 255, 0.055);
  -webkit-backdrop-filter: blur(36px) saturate(1.14);
  backdrop-filter: blur(36px) saturate(1.14);
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.24), inset 0 1px 1px rgba(255, 255, 255, 0.18);
}

.liquid-glass::before,
.liquid-glass-strong::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
}

.liquid-glass::before {
  padding: 0.8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0.15) 20%, transparent 40%, transparent 60%, rgba(255, 255, 255, 0.15) 80%, rgba(255, 255, 255, 0.45));
}

.liquid-glass-strong::before {
  padding: 1.2px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.08) 20%, transparent 40%, transparent 60%, rgba(255, 255, 255, 0.08) 80%, rgba(255, 255, 255, 0.22));
}

@supports not ((backdrop-filter: blur(4px)) or (-webkit-backdrop-filter: blur(4px))) {
  .liquid-glass,
  .liquid-glass-strong {
    background: rgba(0, 0, 0, 0.42);
  }
}

.prototype-page > main {
  display: block !important;
  flex: 1;
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 64rem;
  margin: 0 auto;
  padding: 9rem 1rem 4rem;
}

.prototype-page > main > section {
  margin: 2rem auto 0;
  max-width: 56rem;
  padding: 2rem;
  border-radius: 2rem;
  background: rgba(255, 255, 255, 0.035);
  border: 0;
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.24), inset 0 1px 1px rgba(255, 255, 255, 0.18);
  -webkit-backdrop-filter: blur(36px) saturate(1.14);
  backdrop-filter: blur(36px) saturate(1.14);
}

.prototype-page > main > section > span {
  color: #f2ca50;
}

.prototype-page h1,
.prototype-page h2 {
  font-family: Orbitron, system-ui, sans-serif;
}

.prototype-page h1 {
  text-shadow: 0 2px 3px rgba(0, 0, 0, 0.9), 0 5px 18px rgba(0, 0, 0, 0.65);
}

.prototype-page h2 {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.95), 0 0 15px rgba(242, 202, 80, 0.35);
}

.prototype-page > main > section > p,
.prototype-page > main > section > div p {
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.95), 0 3px 12px rgba(0, 0, 0, 0.65);
}

.prototype-page > main > section > div > div {
  background: rgba(255, 255, 255, 0.035);
  border: 0;
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.18), inset 0 1px 1px rgba(255, 255, 255, 0.13);
  -webkit-backdrop-filter: blur(18px) saturate(1.08);
  backdrop-filter: blur(18px) saturate(1.08);
}

.prototype-footer {
  position: relative;
  z-index: 10;
  width: 100%;
  flex-shrink: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: #202124;
  color: rgba(255, 255, 255, 0.75);
}

#language-menu {
  background: rgba(41, 42, 45, 0.96);
  -webkit-backdrop-filter: blur(18px) saturate(1.08);
  backdrop-filter: blur(18px) saturate(1.08);
}

#prototype-nav-menu {
  width: min(100vw, 32rem);
  gap: 0.4rem;
  padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom));
  border-radius: 1.75rem 1.75rem 0 0;
  transform: translate(-50%, 100%);
  opacity: 0;
  transition: opacity 0.28s ease, transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

#prototype-nav-menu.menu-open {
  opacity: 1;
  transform: translate(-50%, 0);
}

.mobile-menu-heading {
  display: flex;
  align-items: flex-end;
  min-height: 4.4rem;
  margin: 0 0.15rem 0.3rem;
  padding: 0.4rem 0.45rem 0.9rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
}

.mobile-menu-kicker {
  position: absolute;
  top: 0;
  left: 0.45rem;
  color: rgba(242, 202, 80, 0.82);
  font-family: Rajdhani, system-ui, sans-serif;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.mobile-menu-title {
  color: #fff;
  font-family: Orbitron, system-ui, sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.mobile-menu-close-hint {
  color: rgba(255, 255, 255, 0.36);
  font-family: Rajdhani, system-ui, sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  margin-left: auto;
}

.mobile-menu-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 3.35rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 0.9rem;
  color: rgba(255, 255, 255, 0.76);
  font-family: Rajdhani, system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 0.7rem 0.75rem;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.mobile-menu-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.65rem;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(242, 202, 80, 0.9);
  font-size: 1.15rem;
}

.mobile-menu-link:hover,
.mobile-menu-link:focus-visible {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(242, 202, 80, 0.24);
  color: #fff;
  outline: none;
  transform: translateX(0.15rem);
}

.mobile-menu-link[aria-current="page"] {
  background: rgba(242, 202, 80, 0.12);
  border-color: rgba(242, 202, 80, 0.28);
  color: #ffe088;
}

.mobile-menu-arrow {
  color: rgba(255, 255, 255, 0.3);
  font-size: 1.1rem;
  margin-left: auto;
  transition: color 0.2s ease, transform 0.2s ease;
}

.mobile-menu-link:hover .mobile-menu-arrow,
.mobile-menu-link:focus-visible .mobile-menu-arrow {
  color: #f2ca50;
  transform: translateX(0.15rem);
}

@media (max-width: 30rem) {
  #prototype-nav-menu {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #prototype-nav-menu .mobile-menu-heading {
    grid-column: 1 / -1;
  }
}

#prototype-nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 40;
  opacity: 0;
  transition: opacity 0.26s ease;
  pointer-events: none;
}

#prototype-nav-overlay.overlay-open {
  opacity: 1;
  pointer-events: auto;
}

body.mobile-menu-open {
  overflow: hidden;
}

@media (min-width: 768px) {
  .prototype-page > main {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  .prototype-page > main > section {
    padding: 3rem;
  }
}

@media (max-width: 767px) {
  .auth-page > main { padding-top: 7rem; padding-bottom: 3rem; }
  .auth-page > main > section { margin-top: 0; }
  .prototype-footer .footer-inner {
    padding-bottom: calc(1.25rem + env(safe-area-inset-bottom));
  }
}
