:root {
  /* —— Shared dark tokens (landing / login / hub) —— */
  --cosmos: #020203;
  --cosmos-deep: #010101;
  --bg: var(--cosmos);
  --text: #ebe8e2;
  --text-muted: #7a7f8c;
  --velvet: rgba(42, 58, 92, 1);
  --velvet-rgb: 42, 58, 92;
  --velvet-lift-rgb: 70, 88, 130;
  --velvet-deep-rgb: 18, 24, 40;
  --surface: rgba(10, 12, 18, 0.88);
  --surface-elevated: rgba(14, 16, 24, 0.92);
  --surface-border: rgba(255, 255, 255, 0.07);
  --surface-border-strong: rgba(255, 255, 255, 0.12);
  --hub-bg: var(--cosmos);
  --hub-elevated: #101014;
  --hub-card: rgba(14, 14, 18, 0.9);
  --hub-border: rgba(255, 255, 255, 0.07);
  --hub-border-strong: rgba(var(--velvet-rgb), 0.45);
  --hub-text: #ebe8e2;
  --hub-muted: #7a7f8c;
  --accent-soft: #a8b0c0;
  --accent-dim: rgba(var(--velvet-rgb), 0.14);
  --accent-line: rgba(120, 135, 165, 0.22);
  --accent-glow: rgba(var(--velvet-rgb), 0.14);
  --font-display: "Instrument Serif", Georgia, serif;
  --font-body: "DM Sans", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  min-height: 100dvh;
  color: var(--text);
  font-family: var(--font-body);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

/* —— Shared page shell (landing / login / hub) —— */

.page-cosmos {
  position: relative;
  isolation: isolate;
  overflow-x: hidden;
  min-height: 100dvh;
  /* Solid dark field only — no page wash / veil / vignette */
  background: var(--cosmos);
  padding:
    env(safe-area-inset-top, 0)
    env(safe-area-inset-right, 0)
    env(safe-area-inset-bottom, 0)
    env(safe-area-inset-left, 0);
}

.atmosphere {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

/* Decorative atmosphere layers off — page is a flat dark ground */
.atmosphere__haze,
.atmosphere__spill,
.atmosphere__glow,
.atmosphere__vignette,
.atmosphere__grain {
  display: none;
}

@keyframes atm-enter {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Shared glass / velvet surface — material depth, not environment blobs */
.surface {
  position: relative;
  border: 1px solid var(--surface-border-strong);
  background:
    linear-gradient(
      165deg,
      rgba(22, 26, 38, 0.55) 0%,
      rgba(12, 14, 22, 0.72) 38%,
      rgba(8, 10, 16, 0.88) 100%
    );
  backdrop-filter: blur(28px) saturate(1.18);
  -webkit-backdrop-filter: blur(28px) saturate(1.18);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.085) inset,
    0 0 0 1px rgba(255, 255, 255, 0.03) inset,
    0 -1px 0 rgba(var(--velvet-rgb), 0.28) inset,
    0 1px 1px rgba(255, 255, 255, 0.04),
    0 12px 28px rgba(0, 0, 0, 0.38),
    0 28px 56px rgba(0, 0, 0, 0.48),
    0 48px 96px rgba(var(--velvet-deep-rgb), 0.35),
    0 0 0 1px rgba(var(--velvet-rgb), 0.06);
}

.surface::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(180deg, transparent 52%, rgba(var(--velvet-rgb), 0.12) 100%),
    linear-gradient(
      118deg,
      rgba(255, 255, 255, 0.09) 0%,
      rgba(255, 255, 255, 0.03) 18%,
      transparent 42%,
      transparent 100%
    );
}

.surface::after {
  content: "";
  position: absolute;
  top: 0;
  left: 8%;
  right: 8%;
  height: 1px;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.22) 35%,
    rgba(255, 255, 255, 0.1) 65%,
    transparent 100%
  );
  opacity: 0.85;
}

/* —— Landing (hero density) —— */

.page-landing {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.page-landing .landing-center {
  animation: atm-enter 0.85s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

.btn-login {
  position: fixed;
  top: max(1rem, env(safe-area-inset-top, 0px));
  right: max(1rem, env(safe-area-inset-right, 0px));
  z-index: 20;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  padding: 0.4rem 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(242, 242, 242, 0.88);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-decoration: none;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease;
}

.btn-login:hover {
  background: rgba(var(--velvet-rgb), 0.22);
  border-color: rgba(var(--velvet-rgb), 0.42);
  color: #fff;
  box-shadow: 0 8px 24px rgba(var(--velvet-rgb), 0.12);
}

.btn-login:focus-visible {
  outline: 2px solid rgba(var(--velvet-rgb), 0.65);
  outline-offset: 3px;
}

.starfield {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.landing-center {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  padding: 0 1rem 2rem;
  text-align: center;
  animation: atm-enter 0.9s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

@media (min-width: 640px) {
  .landing-center {
    gap: 2rem;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

.moon-wrap {
  position: relative;
  width: 9rem;
  height: 9rem;
  border-radius: 9999px;
}

@media (min-width: 640px) {
  .moon-wrap {
    width: 12rem;
    height: 12rem;
  }
}

@media (min-width: 768px) {
  .moon-wrap {
    width: 14rem;
    height: 14rem;
  }
}

.brand-mark {
  margin: 0;
  color: #f2f2f2;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  user-select: none;
}

@media (min-width: 640px) {
  .brand-mark {
    font-size: 1.125rem;
    letter-spacing: 0.18em;
  }
}

@media (min-width: 768px) {
  .brand-mark {
    font-size: 1.25rem;
  }
}

/* Static moon (gray body + velvet glow) */

.static-moon {
  position: relative;
  width: 100%;
  height: 100%;
}

.moon-halo {
  position: absolute;
  inset: -18%;
  border-radius: 9999px;
  background: radial-gradient(
    circle,
    rgba(var(--velvet-rgb), 0.11) 0%,
    rgba(var(--velvet-rgb), 0.04) 38%,
    transparent 68%
  );
  filter: blur(12px);
  opacity: 0.7;
}

.moon-body {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 9999px;
  overflow: hidden;
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.14) 0%, transparent 42%),
    radial-gradient(circle at 68% 72%, rgba(0, 0, 0, 0.45) 0%, transparent 48%),
    radial-gradient(circle at 38% 36%, #6e6c68 0%, #3a3937 32%, #1c1b1a 58%, #0e0e0e 100%);
  box-shadow:
    inset -18px -14px 48px rgba(0, 0, 0, 0.65),
    inset 10px 8px 28px rgba(255, 255, 255, 0.05),
    0 0 80px rgba(var(--velvet-rgb), 0.1),
    0 0 140px rgba(var(--velvet-rgb), 0.05);
}

.moon-crater {
  position: absolute;
  border-radius: 9999px;
}

.moon-crater--1 {
  width: 22%;
  height: 22%;
  top: 20%;
  left: 54%;
  background: radial-gradient(circle at 40% 35%, rgba(0, 0, 0, 0.15) 0%, rgba(0, 0, 0, 0.55) 70%);
  box-shadow: inset 2px 2px 8px rgba(0, 0, 0, 0.4);
}

.moon-crater--2 {
  width: 14%;
  height: 14%;
  top: 50%;
  left: 26%;
  background: radial-gradient(circle at 35% 30%, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.45) 75%);
}

.moon-crater--3 {
  width: 9%;
  height: 9%;
  top: 66%;
  left: 60%;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.2) 100%);
}

.moon-crater--4 {
  width: 7%;
  height: 7%;
  top: 36%;
  left: 16%;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.4) 0%, transparent 80%);
}

.moon-crater--5 {
  width: 5%;
  height: 5%;
  top: 28%;
  left: 38%;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.35) 0%, transparent 85%);
}

.moon-terminator {
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  background: linear-gradient(115deg, transparent 42%, rgba(0, 0, 0, 0.55) 78%, rgba(0, 0, 0, 0.75) 100%);
}

.moon-rim {
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  pointer-events: none;
  box-shadow:
    inset 0 0 0 1px rgba(var(--velvet-rgb), 0.22),
    0 0 24px rgba(var(--velvet-rgb), 0.08);
}

/* Starfield animations (ported from MoonLanding) */

@keyframes star-twinkle {
  0%,
  100% {
    opacity: var(--star-alpha);
    transform: scale(1);
  }
  42% {
    opacity: calc(var(--star-alpha) * 0.18);
    transform: scale(0.88);
  }
  58% {
    opacity: calc(var(--star-alpha) * 1.08);
    transform: scale(var(--twinkle-scale, 1.2));
  }
}

@-webkit-keyframes star-twinkle {
  0%,
  100% {
    opacity: var(--star-alpha);
    -webkit-transform: scale(1);
    transform: scale(1);
  }
  42% {
    opacity: calc(var(--star-alpha) * 0.18);
    -webkit-transform: scale(0.88);
    transform: scale(0.88);
  }
  58% {
    opacity: calc(var(--star-alpha) * 1.08);
    -webkit-transform: scale(var(--twinkle-scale, 1.2));
    transform: scale(var(--twinkle-scale, 1.2));
  }
}

.star-twinkle {
  transform-origin: center;
  -webkit-animation: star-twinkle var(--twinkle-dur, 4s) ease-in-out infinite;
  animation: star-twinkle var(--twinkle-dur, 4s) ease-in-out infinite;
  -webkit-animation-delay: var(--twinkle-delay, 0s);
  animation-delay: var(--twinkle-delay, 0s);
}

@keyframes star-layer-drift-0 {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  25% {
    transform: translate3d(32px, -22px, 0);
  }
  50% {
    transform: translate3d(-14px, 36px, 0);
  }
  75% {
    transform: translate3d(-38px, 10px, 0);
  }
}

@keyframes star-layer-drift-1 {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  20% {
    transform: translate3d(-42px, 28px, 0);
  }
  45% {
    transform: translate3d(24px, -48px, 0);
  }
  70% {
    transform: translate3d(52px, 18px, 0);
  }
}

@keyframes star-layer-drift-2 {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  30% {
    transform: translate3d(58px, -36px, 0);
  }
  55% {
    transform: translate3d(-32px, 62px, 0);
  }
  80% {
    transform: translate3d(-68px, -20px, 0);
  }
}

@keyframes star-layer-drift-mobile-0 {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  25% {
    transform: translate3d(72px, -48px, 0);
  }
  50% {
    transform: translate3d(-36px, 80px, 0);
  }
  75% {
    transform: translate3d(-88px, 24px, 0);
  }
}

@keyframes star-layer-drift-mobile-1 {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  20% {
    transform: translate3d(-90px, 56px, 0);
  }
  45% {
    transform: translate3d(52px, -96px, 0);
  }
  70% {
    transform: translate3d(110px, 36px, 0);
  }
}

@keyframes star-layer-drift-mobile-2 {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  30% {
    transform: translate3d(120px, -72px, 0);
  }
  55% {
    transform: translate3d(-64px, 124px, 0);
  }
  80% {
    transform: translate3d(-140px, -40px, 0);
  }
}

@-webkit-keyframes star-layer-drift-0 {
  0%,
  100% {
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
  }
  25% {
    -webkit-transform: translate3d(32px, -22px, 0);
    transform: translate3d(32px, -22px, 0);
  }
  50% {
    -webkit-transform: translate3d(-14px, 36px, 0);
    transform: translate3d(-14px, 36px, 0);
  }
  75% {
    -webkit-transform: translate3d(-38px, 10px, 0);
    transform: translate3d(-38px, 10px, 0);
  }
}

@-webkit-keyframes star-layer-drift-1 {
  0%,
  100% {
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
  }
  20% {
    -webkit-transform: translate3d(-42px, 28px, 0);
    transform: translate3d(-42px, 28px, 0);
  }
  45% {
    -webkit-transform: translate3d(24px, -48px, 0);
    transform: translate3d(24px, -48px, 0);
  }
  70% {
    -webkit-transform: translate3d(52px, 18px, 0);
    transform: translate3d(52px, 18px, 0);
  }
}

@-webkit-keyframes star-layer-drift-2 {
  0%,
  100% {
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
  }
  30% {
    -webkit-transform: translate3d(58px, -36px, 0);
    transform: translate3d(58px, -36px, 0);
  }
  55% {
    -webkit-transform: translate3d(-32px, 62px, 0);
    transform: translate3d(-32px, 62px, 0);
  }
  80% {
    -webkit-transform: translate3d(-68px, -20px, 0);
    transform: translate3d(-68px, -20px, 0);
  }
}

@-webkit-keyframes star-layer-drift-mobile-0 {
  0%,
  100% {
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
  }
  25% {
    -webkit-transform: translate3d(72px, -48px, 0);
    transform: translate3d(72px, -48px, 0);
  }
  50% {
    -webkit-transform: translate3d(-36px, 80px, 0);
    transform: translate3d(-36px, 80px, 0);
  }
  75% {
    -webkit-transform: translate3d(-88px, 24px, 0);
    transform: translate3d(-88px, 24px, 0);
  }
}

@-webkit-keyframes star-layer-drift-mobile-1 {
  0%,
  100% {
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
  }
  20% {
    -webkit-transform: translate3d(-90px, 56px, 0);
    transform: translate3d(-90px, 56px, 0);
  }
  45% {
    -webkit-transform: translate3d(52px, -96px, 0);
    transform: translate3d(52px, -96px, 0);
  }
  70% {
    -webkit-transform: translate3d(110px, 36px, 0);
    transform: translate3d(110px, 36px, 0);
  }
}

@-webkit-keyframes star-layer-drift-mobile-2 {
  0%,
  100% {
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
  }
  30% {
    -webkit-transform: translate3d(120px, -72px, 0);
    transform: translate3d(120px, -72px, 0);
  }
  55% {
    -webkit-transform: translate3d(-64px, 124px, 0);
    transform: translate3d(-64px, 124px, 0);
  }
  80% {
    -webkit-transform: translate3d(-140px, -40px, 0);
    transform: translate3d(-140px, -40px, 0);
  }
}

.star-layer {
  position: absolute;
  inset: -6%;
}

@media (hover: none), (pointer: coarse) {
  .star-layer {
    inset: -14%;
  }
}

.star-layer-parallax {
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

@media (hover: hover) {
  .star-layer-parallax {
    translate: var(--parallax-x, 0px) var(--parallax-y, 0px);
  }
}

.star-layer-inner {
  position: absolute;
  inset: 0;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.star-layer-inner.star-layer-drift-0 {
  -webkit-animation: star-layer-drift-0 28s ease-in-out infinite;
  animation: star-layer-drift-0 28s ease-in-out infinite;
}

.star-layer-inner.star-layer-drift-1 {
  -webkit-animation: star-layer-drift-1 22s ease-in-out infinite;
  animation: star-layer-drift-1 22s ease-in-out infinite;
}

.star-layer-inner.star-layer-drift-2 {
  -webkit-animation: star-layer-drift-2 18s ease-in-out infinite;
  animation: star-layer-drift-2 18s ease-in-out infinite;
}

@media (hover: none), (pointer: coarse) {
  .star-layer-inner.star-layer-drift-0 {
    -webkit-animation: star-layer-drift-mobile-0 17s ease-in-out infinite;
    animation: star-layer-drift-mobile-0 17s ease-in-out infinite;
    -webkit-animation-play-state: running !important;
    animation-play-state: running !important;
  }

  .star-layer-inner.star-layer-drift-1 {
    -webkit-animation: star-layer-drift-mobile-1 14s ease-in-out infinite;
    animation: star-layer-drift-mobile-1 14s ease-in-out infinite;
    -webkit-animation-play-state: running !important;
    animation-play-state: running !important;
  }

  .star-layer-inner.star-layer-drift-2 {
    -webkit-animation: star-layer-drift-mobile-2 12s ease-in-out infinite;
    animation: star-layer-drift-mobile-2 12s ease-in-out infinite;
    -webkit-animation-play-state: running !important;
    animation-play-state: running !important;
  }
}

@keyframes shooting-star-streak {
  0% {
    transform: rotate(var(--shoot-angle)) translate3d(0, 0, 0) scaleX(0.15);
    opacity: 0;
  }
  8% {
    opacity: var(--shoot-opacity, 0.55);
  }
  75% {
    opacity: calc(var(--shoot-opacity, 0.55) * 0.35);
  }
  100% {
    transform: rotate(var(--shoot-angle)) translate3d(-115vw, 72vh, 0) scaleX(1);
    opacity: 0;
  }
}

.shooting-star {
  position: absolute;
  width: 72px;
  height: 1px;
  transform-origin: left center;
  pointer-events: none;
  will-change: transform, opacity;
  animation: shooting-star-streak 1.35s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}

.star-dot {
  position: absolute;
  border-radius: 9999px;
}

@media (prefers-reduced-motion: reduce) {
  .star-twinkle,
  .shooting-star,
  .star-layer-inner.star-layer-drift-0,
  .star-layer-inner.star-layer-drift-1,
  .star-layer-inner.star-layer-drift-2 {
    animation: none !important;
  }
}

/* —— Hub (quiet density) —— */

.eyebrow {
  margin: 0;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--hub-muted);
}

.page-hub {
  color: var(--hub-text);
}

.hub-shell {
  position: relative;
  z-index: 10;
  width: min(28rem, calc(100% - 2.5rem));
  margin: 0 auto;
  padding: 3rem 0 3.5rem;
  animation: atm-enter 0.75s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

.hub-head {
  margin-bottom: 2rem;
}

.hub-head-brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  min-width: 0;
}

.hub-logout {
  position: fixed;
  top: max(0.85rem, env(safe-area-inset-top, 0px));
  right: max(0.85rem, env(safe-area-inset-right, 0px));
  z-index: 20;
  margin: 0;
}

.hub-logout-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  padding: 0.35rem 0.65rem;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--hub-muted);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition:
    color 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease;
}

.hub-logout-btn:hover {
  color: var(--hub-text);
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

.hub-logout-btn:active {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
}

.hub-logout-btn:focus-visible {
  outline: 2px solid var(--accent-soft);
  outline-offset: 2px;
  color: var(--hub-text);
}

.moon-badge {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: var(--accent-dim);
  border: 1px solid var(--accent-line);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 0 20px var(--accent-glow),
    0 8px 22px rgba(var(--velvet-rgb), 0.08);
}

.moon-badge--sm {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  margin: 0;
}

.hub-title {
  margin: 0.15rem 0 0;
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 400;
}

.hub-grid {
  display: grid;
  gap: 0.75rem;
}

.hub-card {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1.15rem 1.25rem;
  border-radius: 14px;
  color: inherit;
  text-decoration: none;
  transition:
    border-color 0.22s ease,
    box-shadow 0.22s ease,
    background 0.22s ease,
    transform 0.22s ease;
}

.hub-card:hover {
  border-color: var(--hub-border-strong);
  transform: translateY(-1px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 -1px 0 rgba(var(--velvet-rgb), 0.22) inset,
    0 14px 32px rgba(0, 0, 0, 0.4),
    0 28px 56px rgba(var(--velvet-rgb), 0.1);
}

.hub-card:focus-visible {
  outline: 2px solid var(--accent-soft);
  outline-offset: 3px;
}

.hub-card--soon {
  opacity: 0.5;
  pointer-events: none;
}

.hub-card-name {
  position: relative;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.hub-card-desc {
  position: relative;
  font-size: 0.8rem;
  color: var(--hub-muted);
}

/* —— Login (full density) —— */

.page-login {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.login-shell {
  position: relative;
  z-index: 10;
  width: min(21rem, calc(100% - 2rem));
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 1.15rem;
  animation: atm-enter 0.85s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

.login-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 2.05rem 1.7rem 1.6rem;
  border-radius: 16px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.05) inset,
    0 -1px 0 rgba(var(--velvet-rgb), 0.18) inset,
    0 1px 1px rgba(255, 255, 255, 0.025),
    0 22px 48px rgba(0, 0, 0, 0.5),
    0 56px 100px rgba(0, 0, 0, 0.55),
    0 40px 80px rgba(var(--velvet-rgb), 0.1);
}

.login-title {
  position: relative;
  margin: 0 0 1.2rem;
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: #ebe8e2;
  text-shadow: 0 1px 18px rgba(0, 0, 0, 0.35);
}

.login-label {
  position: relative;
  margin-top: 0.55rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.login-input {
  position: relative;
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.74rem 0.92rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(0, 0, 0, 0.38);
  color: #ebe8e2;
  font-family: var(--font-body);
  font-size: 0.92rem;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset;
  transition:
    border-color 0.22s ease,
    box-shadow 0.22s ease,
    background 0.22s ease,
    transform 0.22s ease;
}

.login-input:hover {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.48);
}

.login-input:focus {
  outline: none;
  border-color: rgba(var(--velvet-rgb), 0.45);
  background: rgba(4, 6, 12, 0.68);
  transform: translateY(-1px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.035) inset,
    0 0 0 1px rgba(var(--velvet-rgb), 0.22),
    0 10px 26px rgba(0, 0, 0, 0.38),
    0 12px 28px rgba(var(--velvet-rgb), 0.08);
}

.login-error {
  position: relative;
  margin: 0.75rem 0 0;
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  border: 1px solid rgba(140, 100, 90, 0.35);
  background: rgba(40, 28, 24, 0.65);
  color: #c9b4a8;
  font-size: 0.8rem;
}

.login-submit {
  position: relative;
  margin-top: 1.3rem;
  min-height: 2.75rem;
  border: 1px solid rgba(210, 205, 195, 0.22);
  border-radius: 10px;
  background:
    linear-gradient(180deg, #ebe6dc 0%, #d4cfc5 100%);
  color: #0c0e14;
  font-family: var(--font-body);
  font-size: 0.84rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.55) inset,
    0 10px 24px rgba(0, 0, 0, 0.28);
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease,
    opacity 0.15s ease;
}

.login-submit:hover:not(:disabled) {
  background: linear-gradient(180deg, #f3efe6 0%, #ddd8ce 100%);
  border-color: rgba(230, 225, 215, 0.35);
  transform: translateY(-1px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.65) inset,
    0 14px 30px rgba(0, 0, 0, 0.34);
}

.login-submit:active:not(:disabled) {
  transform: translateY(1px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.4) inset,
    0 4px 12px rgba(0, 0, 0, 0.28);
}

.login-submit:disabled {
  opacity: 0.55;
  cursor: wait;
  transform: none;
}

.login-submit:focus-visible {
  outline: 1px solid rgba(200, 195, 185, 0.5);
  outline-offset: 3px;
}

.login-back {
  align-self: center;
  color: rgba(235, 232, 226, 0.4);
  font-size: 0.78rem;
  text-decoration: none;
  letter-spacing: 0.02em;
  transition:
    color 0.22s ease,
    opacity 0.22s ease;
}

.login-back:hover {
  color: rgba(235, 232, 226, 0.88);
}

@media (prefers-reduced-motion: reduce) {
  .login-shell,
  .hub-shell,
  .landing-center {
    animation: none;
  }

  .login-input:focus,
  .login-submit:hover:not(:disabled),
  .login-submit:active:not(:disabled),
  .hub-card:hover {
    transform: none;
  }
}
