html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
  overscroll-behavior: none;
  touch-action: manipulation;
  font-family: "Ubuntu", system-ui, sans-serif;
}

#app {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at center, rgba(8, 28, 8, 0.55), rgba(0, 0, 0, 0.96) 58%),
    #000;
}

#landing {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  gap: clamp(14px, 2.4vh, 22px);
  padding: max(24px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
}

#landing-photo {
  width: min(44vw, 180px);
  height: min(44vw, 180px);
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid rgba(74, 246, 38, 0.24);
  box-shadow:
    0 22px 48px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.05) inset;
  transform: translate3d(0, 0, 0);
}

#entropy-sigil {
  position: absolute;
  left: 50%;
  top: 50%;
  margin: 0;
  color: #4af626;
  font-family: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  font-size: clamp(6px, 1.38vw, 10px);
  line-height: 1.02;
  letter-spacing: 0;
  white-space: pre;
  transform: translate3d(-50%, -50%, 0) perspective(1100px) rotateX(0deg) rotateY(0deg) rotateZ(0deg) scale(0.58);
  transform-origin: center;
  opacity: 0.76;
  pointer-events: none;
  user-select: none;
  filter:
    drop-shadow(0 0 12px rgba(74, 246, 38, 0.18))
    drop-shadow(0 0 26px rgba(74, 246, 38, 0.10))
    brightness(1.12);
  transition:
    opacity 120ms linear,
    filter 140ms linear;
  will-change: transform, opacity, filter;
  mix-blend-mode: screen;
}

#entropy-sigil .sigil-cell {
  display: inline-block;
  min-width: 0.58em;
  color: rgba(74, 246, 38, 0.12);
  opacity: 0.14;
  text-shadow:
    0 0 2px rgba(74, 246, 38, 0.10),
    0 0 8px rgba(74, 246, 38, 0.04);
  transition:
    opacity 120ms linear,
    color 120ms linear,
    text-shadow 160ms linear,
    transform 180ms ease;
  transform: translate3d(0, 0, 0);
}

#entropy-sigil .sigil-cell.flare {
  color: #4af626;
  opacity: 0.92;
  text-shadow:
    0 0 8px rgba(74, 246, 38, 0.52),
    0 0 18px rgba(74, 246, 38, 0.28),
    0 0 34px rgba(74, 246, 38, 0.12);
}

#entropy-sigil .sigil-cell.flare-strong {
  color: #4af626;
  opacity: 1;
  text-shadow:
    0 0 12px rgba(74, 246, 38, 0.62),
    0 0 28px rgba(74, 246, 38, 0.34),
    0 0 44px rgba(74, 246, 38, 0.18);
  transform: translate3d(0, -0.02em, 0);
}

#landing-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: min(80vw, 360px);
  min-height: 64px;
  padding: 20px 34px 18px;
  border-radius: 16px;
  color: #4af626;
  text-decoration: none;
  font-family: "Ubuntu", system-ui, sans-serif;
  font-weight: 500;
  font-size: clamp(28px, 7vw, 48px);
  letter-spacing: 0.01em;
  background:
    linear-gradient(180deg, rgba(26, 34, 26, 0.84), rgba(4, 8, 4, 0.96)),
    radial-gradient(120% 160% at 50% 0%, rgba(160, 255, 180, 0.18), rgba(160, 255, 180, 0) 52%),
    linear-gradient(120deg, rgba(74, 246, 38, 0.06), rgba(74, 246, 38, 0));
  border: 1px solid rgba(74, 246, 38, 0.42);
  box-shadow:
    0 22px 48px rgba(0, 0, 0, 0.58),
    0 10px 26px rgba(0, 0, 0, 0.44),
    0 0 0 1px rgba(74, 246, 38, 0.16) inset,
    0 0 14px rgba(74, 246, 38, 0.18),
    0 -8px 16px rgba(0, 0, 0, 0.46) inset;
  clip-path: polygon(12px 0, calc(100% - 12px) 0, 100% 12px, 100% calc(100% - 12px), calc(100% - 12px) 100%, 12px 100%, 0 calc(100% - 12px), 0 12px);
  transform: translate3d(0, 0, 0);
  transition:
    transform 200ms cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 220ms ease,
    border-color 220ms ease,
    filter 220ms ease;
  will-change: transform, box-shadow, filter;
  isolation: isolate;
  overflow: hidden;
  cursor: default;
  -webkit-tap-highlight-color: transparent;
  backface-visibility: hidden;
  pointer-events: none;
}

#app.portal-collapsed #landing-button {
  pointer-events: auto;
  cursor: pointer;
}

#landing-button::before,
#landing-button::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
}

#landing-button::before {
  background:
    linear-gradient(180deg, rgba(190, 255, 204, 0.22), rgba(190, 255, 204, 0.02) 30%, rgba(0, 0, 0, 0.24) 100%);
  opacity: 0.64;
}

#landing-button::after {
  inset: 1px;
  background:
    linear-gradient(180deg, rgba(74, 246, 38, 0.08), rgba(74, 246, 38, 0) 55%),
    radial-gradient(85% 85% at 50% 14%, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0) 56%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(0, 0, 0, 0.14));
  box-shadow:
    0 1px 2px rgba(255, 255, 255, 0.10) inset,
    0 -8px 14px rgba(0, 0, 0, 0.36) inset,
    0 0 0 1px rgba(74, 246, 38, 0.16) inset;
}

.button-sheen,
.button-core,
.button-label {
  position: relative;
  z-index: 1;
}

.button-sheen {
  position: absolute;
  inset: -30% -12%;
  background:
    conic-gradient(from 210deg at 50% 50%, rgba(255, 255, 255, 0) 0deg, rgba(255, 255, 255, 0.15) 42deg, rgba(255, 255, 255, 0) 85deg),
    radial-gradient(circle at 50% 50%, rgba(96, 255, 124, 0.08), rgba(96, 255, 124, 0) 60%);
  filter: blur(18px);
  opacity: 0.8;
  transform: translate3d(0, 0, 0);
}

.button-core {
  position: absolute;
  inset: 8px;
  border-radius: inherit;
  background:
    radial-gradient(circle at 50% 30%, rgba(120, 255, 140, 0.14), rgba(120, 255, 140, 0) 58%),
    linear-gradient(180deg, rgba(10, 14, 10, 0), rgba(10, 14, 10, 0.3));
}

.button-label {
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.06),
    0 2px 8px rgba(0, 0, 0, 0.62),
    0 0 18px rgba(74, 246, 38, 0.26);
}

#landing-button:hover,
#landing-button:focus-visible {
  transform: translate3d(0, -2px, 0) scale(1.035);
  border-color: rgba(74, 246, 38, 0.62);
  box-shadow:
    0 30px 72px rgba(0, 0, 0, 0.62),
    0 14px 36px rgba(0, 0, 0, 0.46),
    0 0 0 1px rgba(74, 246, 38, 0.22) inset,
    0 0 22px rgba(74, 246, 38, 0.24),
    0 -10px 18px rgba(0, 0, 0, 0.42) inset;
  filter: saturate(1.10);
}

#landing-button:active {
  transform: translate3d(0, 1px, 0) scale(0.992);
}

#portal-shell {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  mix-blend-mode: normal;
  background: #000;
  transform: translate3d(0, 0, 0) scale(1);
  opacity: 1;
  transition:
    transform 700ms cubic-bezier(0.16, 1, 0.3, 1),
    opacity 650ms ease,
    filter 650ms ease;
  will-change: transform, opacity, filter;
  backface-visibility: hidden;
  contain: layout paint style;
}

#portal-shell.collapsed {
  opacity: 0;
  filter: blur(10px);
  transform: translate3d(0, -2vh, 0) scale(0.94);
}

#portal-canvas {
  position: absolute;
  left: 50%;
  top: 50%;
  display: block;
  background: #000;
  transform: translate3d(-50%, -50%, 0);
  will-change: transform;
  backface-visibility: hidden;
  contain: layout paint style;
}

#portal-status {
  position: fixed;
  left: 50%;
  bottom: max(14px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  color: #4af626;
  font-family: "Ubuntu", "Ubuntu Medium", "Segoe UI", system-ui, sans-serif;
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.02em;
  white-space: nowrap;
  text-align: center;
  cursor: pointer;
  pointer-events: auto;
  padding: 7px 10px;
  max-width: calc(100vw - 32px);
  box-sizing: border-box;
  overflow: hidden;
  border: 1px solid rgba(74, 246, 38, 0.28);
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  -webkit-appearance: none;
  appearance: none;
  border-radius: 0;
  outline: none;
  z-index: 10;
}

#portal-status:hover,
#portal-status:focus-visible {
  border-color: rgba(74, 246, 38, 0.56);
  box-shadow: 0 0 14px rgba(74, 246, 38, 0.20);
}

#portal-loader-sigil {
  position: fixed;
  left: 0;
  top: 0;
  margin: 0;
  color: #4af626;
  font-family: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  font-size: clamp(9px, 1.08vw, 13px);
  line-height: 1.05;
  letter-spacing: 0;
  white-space: pre;
  pointer-events: none;
  user-select: none;
  text-shadow:
    0 0 8px rgba(74, 246, 38, 0.54),
    0 0 20px rgba(74, 246, 38, 0.28),
    0 0 40px rgba(74, 246, 38, 0.14);
  transform: translate3d(-9999px, -9999px, 0);
  opacity: 0;
  transition: opacity 120ms linear;
  z-index: 9;
  will-change: transform, opacity, filter;
  backface-visibility: hidden;
  filter:
    drop-shadow(0 0 12px rgba(74, 246, 38, 0.16))
    brightness(1.18);
  mix-blend-mode: screen;
}

#portal-loader-sigil.active {
  opacity: 0.98;
}

#portal-status.hidden {
  display: none;
}

@media (hover: none) {
  #landing-button {
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@media (max-width: 640px) {
  #landing-photo {
    width: min(38vw, 146px);
    height: min(38vw, 146px);
  }

  #entropy-sigil {
    font-size: clamp(7px, 1.92vw, 10px);
    transform: translate3d(-50%, -50%, 0) perspective(900px) rotateX(0deg) rotateY(0deg) rotateZ(0deg) scale(0.64);
  }

  #landing-button {
    min-width: min(86vw, 360px);
    min-height: 60px;
    padding: 18px 28px 16px;
    font-size: clamp(24px, 9vw, 40px);
  }

  #portal-loader-sigil {
    font-size: clamp(8px, 1.9vw, 10px);
  }

}
