/* Ported 1:1 from the Kingdomland app (jason-kingdomland-dev) login screen:
   AuthShell (night/split) · NightHeroArt · KdlWordmark · AuthCard. Class names prefixed per module. */

/* ── src/components/Modules/Auth/AuthShell.module.scss ── */
.kas-shell {
  position: relative;
  min-height: 100dvh;
  width: 100%;
  background: var(--kdl-bg);
  overflow: hidden;
}

.kas-bgDesktop {
  display: block;
}
@media (max-width: 940px) {
  .kas-bgDesktop {
    display: none;
  }
}

.kas-bgMobile {
  display: none;
}
@media (max-width: 940px) {
  .kas-bgMobile {
    display: block;
  }
}

.kas-content {
  position: relative;
  z-index: 2;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.kas-nightZone {
  min-height: 100dvh;
}

.kas-night {
  --kdl-auth-art-h: clamp(220px, 58vw, 360px);
  --kdl-auth-art-w: 56vw;
  position: relative;
  min-height: 100dvh;
  width: 100%;
  overflow-x: clip;
  color: #fffdf3;
  font-family: var(--font-jakarta), "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.kas-art {
  pointer-events: none;
}

.kas-nightContent {
  position: relative;
  z-index: 2;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.kas-split .kas-art {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: var(--kdl-auth-art-h);
  z-index: 1;
}

@media (min-width: 1024px) {
  .kas-split .kas-art {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: auto;
    width: calc(var(--kdl-auth-art-w) + 8vw);
    height: auto;
  }
  .kas-split .kas-nightContent {
    margin-left: var(--kdl-auth-art-w);
  }
}
.kas-ambient .kas-art {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 62vh;
  z-index: 1;
}

.kas-caption {
  display: none;
}

@media (min-width: 1024px) {
  .kas-caption {
    position: absolute;
    z-index: 2;
    left: clamp(40px, 4.5vw, 72px);
    right: 22%;
    bottom: clamp(36px, 7vh, 72px);
    display: block;
    animation: kdl-auth-caption-in 900ms cubic-bezier(0.22, 1, 0.36, 1) 200ms both;
  }
}
.kas-captionEyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(7, 14, 44, 0.55);
  border: 1px solid rgba(255, 229, 98, 0.3);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #ffe562;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.kas-captionTitle {
  font-family: var(--font-fraunces), "Fraunces", Georgia, "Times New Roman", serif;
  font-weight: 900;
  letter-spacing: -0.01em;
  line-height: 1.02;
}
.kas-captionTitle em {
  font-style: italic;
  background: linear-gradient(180deg, var(--kdl-gold-light), var(--kdl-gold) 60%, var(--kdl-gold-deep));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.kas-captionTitle {
  margin: 14px 0 0;
  max-width: 460px;
  font-size: clamp(34px, 3.3vw, 48px);
  color: #fff;
  text-wrap: balance;
  text-shadow: 0 3px 0 rgba(7, 14, 44, 0.55), 0 12px 32px rgba(0, 0, 0, 0.55);
}
.kas-captionTitle em {
  text-shadow: none;
  filter: drop-shadow(0 3px 0 rgba(7, 14, 44, 0.55));
}

@keyframes kdl-auth-caption-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .kas-caption {
    animation: none;
  }
}
/* ── src/atomics/auth/NightHeroArt.module.scss ── */
.kna-root {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  isolation: isolate;
}

.kna-frame {
  position: absolute;
  inset: 0;
}

.kna-img {
  object-fit: cover;
}

.kna-grade,
.kna-vignette,
.kna-glow {
  position: absolute;
  inset: 0;
}

.kna-split {
  -webkit-mask-image: linear-gradient(180deg, #000 62%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 62%, transparent 100%);
}
.kna-split .kna-img {
  object-position: 50% 58%;
  transform-origin: 50% 70%;
  animation: kdl-hero-art-drift 26s ease-in-out infinite alternate;
}
.kna-split .kna-grade {
  background: linear-gradient(180deg, rgba(14, 27, 77, 0.62) 0%, rgba(14, 27, 77, 0.28) 38%, rgba(14, 27, 77, 0.08) 70%);
  mix-blend-mode: multiply;
}
.kna-split .kna-vignette {
  background: linear-gradient(180deg, rgba(7, 14, 44, 0.5) 0%, rgba(7, 14, 44, 0) 30%, rgba(7, 14, 44, 0) 50%, rgba(7, 14, 44, 0.78) 80%, #070e2c 100%);
}
.kna-split .kna-glow {
  background: radial-gradient(70% 40% at 50% 92%, rgba(246, 181, 35, 0.2), transparent 70%);
  mix-blend-mode: screen;
}
@media (min-width: 1024px) {
  .kna-split {
    -webkit-mask-image: linear-gradient(90deg, #000 58%, transparent 100%);
    mask-image: linear-gradient(90deg, #000 58%, transparent 100%);
  }
  .kna-split .kna-img {
    object-position: 46% 62%;
  }
  .kna-split .kna-vignette {
    background: linear-gradient(90deg, rgba(7, 14, 44, 0) 55%, rgba(7, 14, 44, 0.4) 100%), linear-gradient(180deg, rgba(7, 14, 44, 0.62) 0%, rgba(7, 14, 44, 0) 24%, rgba(7, 14, 44, 0) 50%, rgba(7, 14, 44, 0.9) 100%), radial-gradient(130% 100% at 38% 50%, transparent 58%, rgba(3, 8, 30, 0.5) 100%);
  }
  .kna-split .kna-glow {
    background: radial-gradient(55% 38% at 32% 100%, rgba(246, 181, 35, 0.24), transparent 72%);
  }
}

.kna-ambient .kna-frame {
  opacity: 0.4;
  -webkit-mask-image: linear-gradient(0deg, #000 0%, rgba(0, 0, 0, 0.55) 38%, transparent 82%);
  mask-image: linear-gradient(0deg, #000 0%, rgba(0, 0, 0, 0.55) 38%, transparent 82%);
}
.kna-ambient .kna-img {
  object-position: 50% 100%;
  filter: saturate(0.85);
}
.kna-ambient .kna-grade {
  background: linear-gradient(0deg, rgba(7, 14, 44, 0.5) 0%, rgba(7, 14, 44, 0.15) 40%, transparent 70%);
}
.kna-ambient .kna-glow {
  background: radial-gradient(55% 32% at 50% 100%, rgba(246, 181, 35, 0.14), transparent 72%);
}

@keyframes kdl-hero-art-drift {
  from {
    transform: scale(1.02);
  }
  to {
    transform: scale(1.08) translate3d(-1%, -0.6%, 0);
  }
}
@media (prefers-reduced-motion: reduce) {
  .kna-split .kna-img {
    animation: none;
    transform: none;
  }
}
/* ── src/atomics/auth/KdlWordmark.module.scss ── */
.kwm-logo {
  display: block;
  height: var(--kdl-wordmark-h, 32px);
  width: auto;
  max-width: none;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  filter: drop-shadow(0 2px 0 rgba(7, 14, 44, 0.55)) drop-shadow(0 8px 18px rgba(3, 8, 30, 0.45));
}
/* ── src/components/Auth/AuthCard.module.scss ── */
.kac-root {
  --gold1: #ffe562;
  --gold2: #f6b523;
  --cream: #fffdf3;
  --cream-80: rgba(255, 253, 243, 0.8);
  --cream-66: rgba(255, 253, 243, 0.66);
  --navy: #0e1b4d;
  --error: #ffb0b0;
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: calc(env(safe-area-inset-top, 0px) + 18px) 18px calc(env(safe-area-inset-bottom, 0px) + 32px);
  color: var(--cream);
}
@media (min-width: 1024px) {
  .kac-root {
    justify-content: center;
    padding: 36px 48px 40px;
  }
}

.kac-brand {
  --kdl-wordmark-h: 34px;
  display: flex;
  justify-content: center;
  margin-bottom: calc(var(--kdl-auth-art-h, 240px) - 18px - 34px - 72px);
}
@media (min-width: 1024px) {
  .kac-brand {
    --kdl-wordmark-h: 46px;
    margin-bottom: 26px;
  }
}

.kac-card {
  position: relative;
  width: 100%;
  max-width: 440px;
  padding: 28px 22px 24px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(255, 253, 243, 0.12), rgba(255, 253, 243, 0.04)), rgba(10, 19, 58, 0.74);
  border: 1px solid rgba(255, 229, 98, 0.22);
  backdrop-filter: blur(18px) saturate(1.15);
  -webkit-backdrop-filter: blur(18px) saturate(1.15);
  box-shadow: 0 24px 60px rgba(3, 8, 30, 0.6), inset 0 1px 0 rgba(255, 253, 243, 0.08);
  animation: kdl-auth-card-in 520ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
.kac-card::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 28px;
  right: 28px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 229, 98, 0.75), transparent);
  pointer-events: none;
}
@media (min-width: 1024px) {
  .kac-card {
    padding: 34px 36px 28px;
  }
}

@keyframes kdl-auth-card-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.kac-logo {
  display: none;
}

.kac-heading {
  font-family: var(--font-fraunces), "Fraunces", Georgia, "Times New Roman", serif;
  font-weight: 900;
  letter-spacing: -0.01em;
  line-height: 1.02;
}
.kac-heading em {
  font-style: italic;
  background: linear-gradient(180deg, var(--kdl-gold-light), var(--kdl-gold) 60%, var(--kdl-gold-deep));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.kac-heading {
  margin: 0 0 8px;
  font-size: 32px;
  line-height: 1.05;
  text-align: center;
  color: var(--cream);
  text-wrap: balance;
}
@media (min-width: 1024px) {
  .kac-heading {
    font-size: 38px;
  }
}

.kac-sub {
  margin: 0 0 22px;
  text-align: center;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--cream-80);
}

.kac-parentPill {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 14px 0 20px;
  padding: 12px 14px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255, 229, 98, 0.14), rgba(246, 181, 35, 0.05));
  border: 1px solid rgba(255, 229, 98, 0.28);
  color: var(--cream-80);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
}
.kac-parentPill b {
  color: var(--gold1);
  font-weight: 800;
}

.kac-parentPillIcon {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 16px;
  line-height: 1;
  background: linear-gradient(180deg, var(--gold1), var(--gold2));
  box-shadow: 0 6px 14px rgba(246, 181, 35, 0.35);
}

.kac-oauthRow {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 18px;
}

.kac-oauthBtn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 52px;
  padding: 0 18px;
  border-radius: 999px;
  background: rgba(255, 253, 243, 0.06);
  border: 1px solid rgba(255, 253, 243, 0.22);
  color: var(--cream);
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 180ms ease, border-color 180ms ease, transform 180ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
.kac-oauthBtn:hover:not(:disabled) {
  background: rgba(255, 253, 243, 0.12);
  border-color: rgba(255, 229, 98, 0.45);
}
.kac-oauthBtn:active:not(:disabled) {
  transform: scale(0.98);
}
.kac-oauthBtn:focus-visible {
  outline: 2px solid var(--gold1);
  outline-offset: 3px;
}
.kac-oauthBtn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.kac-oauthIcon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fff;
  box-shadow: 0 2px 6px rgba(3, 8, 30, 0.35);
}

.kac-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 2px 0 18px;
  color: var(--cream-66);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}
.kac-divider span {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 229, 98, 0.35));
}
.kac-divider span:last-child {
  background: linear-gradient(90deg, rgba(255, 229, 98, 0.35), transparent);
}

.kac-formGroup {
  margin-bottom: 16px;
}

.kac-formRow {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 359px) {
  .kac-formRow {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

.kac-formLabel {
  display: block;
  margin-bottom: 8px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cream-80);
}

.kac-formInput {
  display: block;
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 253, 243, 0.18);
  background: rgba(7, 14, 44, 0.55);
  box-shadow: inset 0 1px 2px rgba(3, 8, 30, 0.35);
  color: var(--cream);
  caret-color: var(--gold1);
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  transition: border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}
.kac-formInput::placeholder {
  color: rgba(255, 253, 243, 0.5);
  font-weight: 500;
}
.kac-formInput:hover:not(:disabled) {
  border-color: rgba(255, 229, 98, 0.38);
}
.kac-formInput:focus {
  outline: none;
  border-color: var(--gold1);
  background: rgba(7, 14, 44, 0.72);
}
.kac-formInput:focus-visible {
  outline: 2px solid var(--gold1);
  outline-offset: 2px;
  box-shadow: inset 0 1px 2px rgba(3, 8, 30, 0.35), 0 0 24px rgba(255, 229, 98, 0.16);
}
.kac-formInput[aria-invalid=true] {
  border-color: rgba(255, 143, 143, 0.8);
}
.kac-formInput:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.kac-formInput:-webkit-autofill, .kac-formInput:-webkit-autofill:hover, .kac-formInput:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--cream);
  caret-color: var(--gold1);
  box-shadow: 0 0 0 1000px #111c4f inset;
  transition: background-color 9999s ease-out 0s;
}

.kac-fieldError {
  margin: 8px 0 0;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--error);
}

.kac-passwordHint {
  margin: 8px 0 0;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--cream-66);
}

.kac-submit {
  width: 100%;
  min-height: 54px;
  margin-top: 12px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: var(--navy);
  background: linear-gradient(180deg, var(--gold1), var(--gold2));
  box-shadow: 0 12px 28px rgba(246, 181, 35, 0.42), inset 0 -2px 0 rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.45);
  transition: transform 180ms cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 180ms ease, opacity 180ms ease;
}
.kac-submit:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 16px 36px rgba(246, 181, 35, 0.55), inset 0 -2px 0 rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
.kac-submit:active:not(:disabled) {
  transform: scale(0.98);
}
.kac-submit:focus-visible {
  outline: 2px solid var(--gold1);
  outline-offset: 3px;
}
.kac-submit:disabled {
  cursor: not-allowed;
  opacity: 0.62;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.kac-terms a, .kac-recaptchaBranding a, .kac-forgotRow a, .kac-foot a {
  color: var(--gold1);
  font-weight: 800;
  text-decoration: underline;
  text-decoration-color: rgba(255, 229, 98, 0.45);
  text-underline-offset: 3px;
  border-radius: 6px;
  cursor: pointer;
}
.kac-terms a:hover, .kac-recaptchaBranding a:hover, .kac-forgotRow a:hover, .kac-foot a:hover, .kac-terms a:focus, .kac-recaptchaBranding a:focus, .kac-forgotRow a:focus, .kac-foot a:focus, .kac-terms a:active, .kac-recaptchaBranding a:active, .kac-forgotRow a:active, .kac-foot a:active {
  color: #fff3a6;
  text-decoration-color: currentColor;
}
.kac-terms a:focus-visible, .kac-recaptchaBranding a:focus-visible, .kac-forgotRow a:focus-visible, .kac-foot a:focus-visible {
  outline: 2px solid var(--gold1);
  outline-offset: 2px;
}

.kac-foot {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 253, 243, 0.1);
  text-align: center;
  font-size: 14.5px;
  color: var(--cream-80);
}
.kac-foot a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 4px;
}

.kac-forgotRow {
  display: flex;
  justify-content: flex-end;
  margin: -8px 0 4px;
}
.kac-forgotRow a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 2px;
  font-size: 13.5px;
  font-weight: 700;
}

.kac-bannerSuccess, .kac-bannerError {
  padding: 11px 14px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.45;
  margin-bottom: 16px;
}

.kac-bannerError {
  background: rgba(255, 99, 99, 0.12);
  border: 1px solid rgba(255, 143, 143, 0.38);
  color: #ffd0d0;
}

.kac-bannerSuccess {
  background: rgba(94, 220, 150, 0.1);
  border: 1px solid rgba(124, 230, 170, 0.34);
  color: #c4f7da;
}

.kac-recaptchaBranding {
  margin-top: 14px;
  text-align: center;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--cream-66);
}
.kac-recaptchaBranding a {
  font-weight: 700;
}

.kac-terms {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: 44px;
  margin: 14px 0 4px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--cream-80);
  cursor: pointer;
}
.kac-terms input {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  accent-color: var(--gold2);
  cursor: pointer;
}
.kac-terms input:focus-visible {
  outline: 2px solid var(--gold1);
  outline-offset: 2px;
}
.kac-terms + .kac-fieldError {
  margin-top: -4px;
  margin-bottom: 6px;
}

@media (prefers-reduced-motion: reduce) {
  .kac-card {
    animation: none;
  }
  .kac-oauthBtn,
  .kac-submit {
    transition: none;
  }
  .kac-oauthBtn:hover:not(:disabled), .kac-oauthBtn:active:not(:disabled),
  .kac-submit:hover:not(:disabled),
  .kac-submit:active:not(:disabled) {
    transform: none;
  }
}
/* ── globals.css (tokens + night sky) ── */
:root {
  /* constants (same in both zones) */
  --kdl-navy-deep: #070e2c;
  --kdl-navy: #0e1b4d;
  --kdl-navy-mid: #1b2a6b;
  --kdl-navy-light: #2d3f8e;
  --kdl-royal: #3d4fd6;
  --kdl-cream: #fffdf3;
  --kdl-gold-light: #ffe562;
  --kdl-gold-deep: #cb9302;
  --kdl-ease-pop: cubic-bezier(0.34, 1.56, 0.64, 1);
  --kdl-ease-out: cubic-bezier(0.22, 1, 0.36, 1);

  /* Kingdom Day */
  --kdl-bg: #fbf5e7;
  --kdl-bg-solid: #fbf5e7;
  --kdl-surface: #ffffff;
  --kdl-surface-hi: #fdf8ec;
  --kdl-top-bar: rgba(255, 255, 255, 0.92);
  --kdl-tab-bar: rgba(255, 255, 255, 0.98);
  --kdl-sidebar: #3d4fd6;
  --kdl-text: #0f1530;
  --kdl-text-muted: #3a4480;
  --kdl-text-faint: #7a82a8;
  --kdl-text-dim: #5b6178;
  --kdl-border: rgba(15, 21, 48, 0.12);
  --kdl-border-soft: rgba(15, 21, 48, 0.06);
  --kdl-chip-bg: rgba(15, 21, 48, 0.05);
  --kdl-glass: rgba(255, 255, 255, 0.72);
  --kdl-glass-hi: rgba(255, 255, 255, 0.9);
  --kdl-glass-line: rgba(15, 21, 48, 0.1);
  --kdl-thumb-bg: #e6e9fb;
  --kdl-gold: #f4a93c;
  --kdl-ink: #0a1236;
  --kdl-accent: #3d4fd6;
  --kdl-shadow-card: 0 4px 14px rgba(15, 21, 48, 0.08), 0 1px 3px rgba(15, 21, 48, 0.06);
  --kdl-shadow-hero: 0 20px 50px rgba(15, 21, 48, 0.12), 0 6px 20px rgba(15, 21, 48, 0.08);
  --kdl-shadow-cta: 0 8px 20px rgba(244, 169, 60, 0.35), 0 2px 6px rgba(244, 169, 60, 0.2);
  --kdl-shadow-gold: 0 10px 26px rgba(246, 181, 35, 0.35);
  --kdl-cream-wash-top: rgba(251, 245, 231, 0.55);
  --kdl-cream-wash-mid: rgba(251, 245, 231, 0.72);
  --kdl-cream-wash-bottom: rgba(251, 245, 231, 0.88);
}
[data-zone="night"] {
  color-scheme: dark;
  --kdl-bg: transparent; /* the fixed .kdl-sky paints the page */
  --kdl-bg-solid: #070e2c;
  --kdl-surface: #121f5c;
  --kdl-surface-hi: #1b2a6b;
  --kdl-top-bar: rgba(7, 14, 44, 0.78);
  --kdl-tab-bar: rgba(10, 18, 56, 0.72);
  --kdl-sidebar: #0e1b4d;
  --kdl-text: #fffdf3;
  --kdl-text-muted: rgba(255, 253, 243, 0.8);
  --kdl-text-faint: rgba(255, 253, 243, 0.62);
  --kdl-text-dim: rgba(255, 253, 243, 0.72);
  --kdl-border: rgba(255, 229, 98, 0.22);
  --kdl-border-soft: rgba(255, 253, 243, 0.1);
  --kdl-chip-bg: rgba(255, 253, 243, 0.08);
  --kdl-glass: rgba(255, 253, 243, 0.08);
  --kdl-glass-hi: rgba(255, 253, 243, 0.14);
  --kdl-glass-line: rgba(255, 229, 98, 0.22);
  --kdl-thumb-bg: #14225f;
  --kdl-gold: #f6b523;
  --kdl-ink: #0e1b4d;
  --kdl-accent: #a9b6ff;
  --kdl-shadow-card: 0 6px 18px rgba(3, 8, 30, 0.45), 0 1px 3px rgba(3, 8, 30, 0.35);
  --kdl-shadow-hero: 0 24px 60px rgba(3, 8, 30, 0.6), 0 8px 24px rgba(3, 8, 30, 0.4);
  --kdl-shadow-cta: 0 10px 26px rgba(246, 181, 35, 0.45), 0 2px 6px rgba(246, 181, 35, 0.25);
  --kdl-shadow-gold: 0 12px 28px rgba(246, 181, 35, 0.45);
  --kdl-cream-wash-top: rgba(7, 14, 44, 0.2);
  --kdl-cream-wash-mid: rgba(7, 14, 44, 0.55);
  --kdl-cream-wash-bottom: rgba(7, 14, 44, 0.92);
  color: var(--kdl-text);
}
.kdl-zone {
  position: relative;
}
.kdl-sky {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  /* Large-viewport height covers iOS toolbar collapse without overflowing
     the layout viewport (an inset:-6% overflow composited over content in
     full-page captures as a dark band). html/body are navy underneath. */
  height: 100vh;
  height: 100lvh;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(120% 80% at 50% -10%, #23378f 0%, #101c58 38%, #070e2c 100%);
}
.kdl-sky::before {
  /* starfield: three tiled layers of soft dots at different scales */
  content: '';
  position: absolute;
  inset: 0;
  /* One shared starfield for every night page (LayoutWrapper <main> and
     <NightZone>) — tuned so pages don't need a local copy. */
  opacity: 0.85;
  background-image:
    radial-gradient(1px 1px at 12% 18%, rgba(255, 255, 255, 0.9), transparent 70%),
    radial-gradient(1.5px 1.5px at 68% 32%, rgba(255, 253, 243, 0.8), transparent 70%),
    radial-gradient(1px 1px at 84% 74%, rgba(255, 255, 255, 0.7), transparent 70%),
    radial-gradient(1px 1px at 36% 86%, rgba(255, 229, 98, 0.75), transparent 70%),
    radial-gradient(2px 2px at 52% 58%, rgba(255, 255, 255, 0.55), transparent 70%),
    radial-gradient(1px 1px at 22% 62%, rgba(255, 255, 255, 0.65), transparent 70%);
  background-size: 340px 340px, 520px 520px, 280px 280px, 460px 460px, 700px 700px, 380px 380px;
  animation: kdl-twinkle 9s ease-in-out infinite alternate;
}
.kdl-sky::after {
  /* warm gold glow rising from the horizon */
  content: '';
  position: absolute;
  inset: 0;
  /* Gold horizon glow sits just above the viewport's bottom edge and fades out
     before it — centred ON the edge it was cut into a hard band wherever the
     fixed sky ends (full-page App Store captures). */
  background:
    radial-gradient(60% 28% at 50% 80%, rgba(246, 181, 35, 0.15), transparent 70%),
    radial-gradient(40% 30% at 90% 10%, rgba(61, 79, 214, 0.25), transparent 70%);
}
@keyframes kdl-twinkle {
  from { opacity: 0.7; }
  to { opacity: 1; }
}

/* ---------- reveal-on-scroll (useReveal / <Reveal>) ----------
   Fail-safe: this file NEVER hides .kdl-reveal content. The hidden state
   (.kdl-reveal:not(.kdl-reveal-in) { opacity: 0 }) is injected into <head> as
   <style id="kdl-reveal-armed"> only when JS runs, and is removed again if
   React never mounts — see src/lib/theme/revealBoot.ts. No JS, no scripting,
   reduced motion, or a hydration failure → content is simply visible.
   Do not add an unscoped `opacity: 0` for .kdl-reveal here. */
.kdl-reveal {
  transition:
    opacity 600ms ease var(--kdl-reveal-delay, 0ms),
    transform 600ms var(--kdl-ease-pop) var(--kdl-reveal-delay, 0ms);
}
@media (scripting: none) {
  .kdl-reveal,
  .kdl-reveal:not(.kdl-reveal-in) {
    opacity: 1 !important;
    transform: none !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  .kdl-reveal,
  .kdl-reveal:not(.kdl-reveal-in) {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ---------- page transition (src/app/template.tsx) ---------- */
.kdl-page-enter {
  animation: kdl-page-in 250ms var(--kdl-ease-out) both;
}
@keyframes kdl-page-in {
  from { opacity: 0; padding-top: 10px; }
  to { opacity: 1; padding-top: 0; }
}

/* ---------- shared night helpers (usable from Tailwind-styled markup) ---------- */
.kdl-display {
  font-family: var(--font-fraunces), 'Fraunces', Georgia, serif;
  font-weight: 900;
  letter-spacing: -0.01em;
  line-height: 1.02;
}
.kdl-display em,
.kdl-em {
  font-style: italic;
  background: linear-gradient(180deg, var(--kdl-gold-light), var(--kdl-gold) 60%, var(--kdl-gold-deep));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.kdl-glass {
  background: var(--kdl-glass);
  border: 1px solid var(--kdl-glass-line);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.kdl-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--kdl-gold-light);
}
.kdl-btn-gold {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 0;
  font-weight: 800;
  font-size: 14px;
  color: var(--kdl-ink);
  background: linear-gradient(180deg, var(--kdl-gold-light), var(--kdl-gold));
  box-shadow: var(--kdl-shadow-gold), inset 0 -2px 0 rgba(0, 0, 0, 0.12);
  transition: transform 150ms var(--kdl-ease-pop), box-shadow 150ms ease;
  cursor: pointer;
}
.kdl-btn-gold:hover { transform: translateY(-1px); }
.kdl-btn-gold:active { transform: scale(0.97); }
.kdl-btn-gold:focus-visible { outline: 2px solid var(--kdl-gold-light); outline-offset: 3px; }

main[data-zone="night"],
.kdl-zone[data-zone="night"] {
  /* Solid fallback under the fixed sky: deep navy that the sky fades into. */
  background-color: #070e2c;
  background-image: linear-gradient(180deg, transparent 0, transparent 90vh, #070e2c 100vh),
    radial-gradient(90% 60% at 50% 0%, #1a2a78 0%, #0c1850 45%, #070e2c 100%);
  background-repeat: no-repeat;
  background-size: 100% 100%, 100% 100vh;
}
