@font-face {
  font-family: "WishVault Source Han Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/static/fonts/source-han-serif-sc-400.ttf") format("truetype");
}

@font-face {
  font-family: "WishVault Source Han Serif";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/static/fonts/source-han-serif-sc-600.ttf") format("truetype");
}

:root {
  --cyan: #a8d8ea;
  --cyan-bright: #e5f8ff;
  --purple: #b39af1;
  --gold: #f2c96d;
  --font-source-serif: "WishVault Source Han Serif", "Source Han Serif SC", "Noto Serif CJK SC", "Songti SC", STSong, serif;
}

.starwish-page {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: linear-gradient(to bottom, #050810 0%, #0a1020 100%);
  color: #eef8fb;
  user-select: none;
}

.sky-root,
.sky-root canvas,
.sky-vignette,
.reveal-flash {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
}

.sky-root canvas {
  display: block;
  touch-action: none;
}

.sky-vignette {
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(1, 3, 8, 0.2), transparent 28%, transparent 64%, rgba(1, 3, 8, 0.5)),
    linear-gradient(to right, rgba(1, 3, 8, 0.36), transparent 24%, transparent 76%, rgba(1, 3, 8, 0.36));
}

.reveal-flash {
  z-index: 8;
  opacity: 0;
  pointer-events: none;
  background: radial-gradient(circle at var(--flash-x, 50%) var(--flash-y, 44%), rgba(229, 248, 255, 0.5), rgba(168, 216, 234, 0.16) 20%, transparent 58%);
}

.reveal-flash.purple {
  background: radial-gradient(circle at var(--flash-x, 50%) var(--flash-y, 44%), rgba(237, 229, 255, 0.5), rgba(179, 154, 241, 0.18) 22%, transparent 60%);
}

.reveal-flash.gold {
  background: radial-gradient(circle at var(--flash-x, 50%) var(--flash-y, 44%), rgba(255, 247, 211, 0.5), rgba(242, 201, 109, 0.2) 22%, transparent 60%);
}

.reveal-flash.active {
  animation: radial-flash 800ms ease-out both;
}

.mountains {
  position: fixed;
  z-index: 2;
  right: -3vw;
  bottom: -1px;
  left: -3vw;
  height: 22vh;
  min-height: 120px;
  pointer-events: none;
  transform-origin: bottom;
  transition: transform 1.45s cubic-bezier(0.55, 0, 0.78, 0.2), opacity 900ms ease;
}

.mountains-far {
  bottom: 4vh;
  height: 18vh;
  opacity: 0.76;
  background: #060a12;
  clip-path: polygon(0 82%, 8% 54%, 15% 74%, 25% 31%, 34% 76%, 45% 48%, 56% 78%, 66% 36%, 75% 69%, 85% 42%, 94% 72%, 100% 55%, 100% 100%, 0 100%);
}

.mountains-near {
  background: #020408;
  clip-path: polygon(0 62%, 10% 38%, 18% 66%, 30% 27%, 39% 70%, 51% 45%, 61% 74%, 72% 29%, 82% 68%, 91% 42%, 100% 65%, 100% 100%, 0 100%);
}

/* Keep the cinematic silhouette without covering the lower nebulae on 16:9 displays. */
.display-mode .mountains {
  height: 7vh;
  min-height: 40px;
}

.display-mode .mountains-far {
  bottom: 0;
  height: 5vh;
}

.is-launching .mountains {
  opacity: 0;
  transform: translateY(110%);
}

.site-header {
  position: fixed;
  z-index: 5;
  top: 0;
  right: 0;
  left: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: clamp(24px, 3.4vw, 64px) clamp(24px, 4vw, 80px);
  pointer-events: none;
  transition: opacity 700ms ease;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 15px;
}

.brand-copy {
  display: none;
}

.star-sigil {
  position: relative;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
}

.star-sigil::before,
.star-sigil::after {
  position: absolute;
  top: 50%;
  left: 50%;
  background: var(--cyan-bright);
  box-shadow: 0 0 14px rgba(168, 216, 234, 0.7);
  content: "";
  transform: translate(-50%, -50%);
}

.star-sigil::before { width: 3px; height: 30px; }
.star-sigil::after { width: 30px; height: 3px; }

.session-countdown-display {
  display: flex;
  min-width: 118px;
  height: 36px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 11px;
  border: 1px solid rgba(168, 216, 234, 0.32);
  border-radius: 4px;
  background: rgba(5, 8, 16, 0.7);
  color: rgba(224, 239, 245, 0.6);
  font: 600 11px/1 var(--font-display);
  backdrop-filter: blur(12px);
}

.session-countdown-display[hidden] {
  display: none;
}

.has-session-countdown .star-sigil {
  display: none;
}

.session-countdown-display svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  color: rgba(168, 216, 234, 0.78);
}

.session-countdown-display strong {
  min-width: 45px;
  color: var(--cyan-bright);
  font-family: var(--font-mono);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  letter-spacing: 0;
  text-align: right;
}

.session-countdown-display[data-warning="true"] {
  border-color: rgba(242, 201, 109, 0.58);
  background: rgba(17, 14, 8, 0.84);
  color: rgba(255, 239, 198, 0.72);
}

.session-countdown-display[data-warning="true"] svg,
.session-countdown-display[data-warning="true"] strong {
  color: #fff1c7;
}

.participant-account {
  display: flex;
  min-height: 34px;
  align-items: center;
  gap: 10px;
  padding: 0 11px;
  border: 1px solid rgba(168, 216, 234, 0.28);
  border-radius: 4px;
  background: rgba(5, 8, 16, 0.68);
  color: rgba(224, 239, 245, 0.7);
  font: 500 12px/1 var(--font-display);
  backdrop-filter: blur(12px);
}

.participant-account[hidden] {
  display: none;
}

.has-participant-account .star-sigil {
  display: none;
}

.participant-phone strong,
.participant-balance strong {
  color: var(--cyan-bright);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
}

.participant-account-divider {
  width: 1px;
  height: 14px;
  background: rgba(168, 216, 234, 0.24);
}

.brand-lockup p {
  margin: 0 0 4px;
  color: rgba(168, 216, 234, 0.64);
  font-family: var(--font-mono);
  font-size: clamp(9px, 0.64vw, 12px);
  font-weight: 700;
}

.brand-lockup h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(22px, 1.65vw, 34px);
  font-weight: 680;
  line-height: 1.1;
}

.sky-count {
  display: flex;
  align-items: baseline;
  gap: 11px;
  color: rgba(224, 239, 245, 0.5);
  font-family: var(--font-mono);
  font-size: clamp(10px, 0.7vw, 13px);
}

.sky-count strong {
  color: var(--cyan-bright);
  font-size: clamp(28px, 2.3vw, 50px);
  font-weight: 430;
  line-height: 1;
  text-shadow: 0 0 24px rgba(168, 216, 234, 0.35);
}

.site-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.kiosk-screen-logout {
  display: inline-flex;
  min-width: 112px;
  height: 38px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid rgba(168, 216, 234, 0.3);
  border-radius: 5px;
  background: rgba(5, 9, 17, 0.72);
  color: rgba(225, 241, 247, 0.76);
  font: 600 12px/1 var(--font-display);
  pointer-events: auto;
  backdrop-filter: blur(12px);
  transition: border-color 180ms ease, background 180ms ease, color 180ms ease;
}

.kiosk-screen-logout:hover:not(:disabled) {
  border-color: rgba(168, 216, 234, 0.62);
  background: rgba(17, 35, 48, 0.82);
  color: var(--cyan-bright);
}

.kiosk-screen-logout:disabled {
  cursor: wait;
  opacity: 0.56;
}

.kiosk-screen-logout svg {
  width: 16px;
  height: 16px;
}

.kiosk-screen-logout[hidden],
.participant-mode .kiosk-screen-logout {
  display: none !important;
}

.participant-logout {
  display: grid;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid rgba(168, 216, 234, 0.28);
  border-radius: 50%;
  background: rgba(5, 8, 16, 0.68);
  color: rgba(224, 239, 245, 0.78);
  cursor: pointer;
  pointer-events: auto;
  place-items: center;
  transition: border-color 180ms ease, color 180ms ease, opacity 180ms ease;
}

.participant-logout:hover {
  border-color: rgba(168, 216, 234, 0.58);
  color: var(--cyan-bright);
}

.participant-logout:disabled {
  cursor: wait;
  opacity: 0.45;
}

.participant-logout svg {
  width: 16px;
  height: 16px;
}

.display-mode .participant-logout {
  display: none !important;
}

.session-expiry-notice {
  position: fixed;
  z-index: 9;
  top: max(82px, calc(env(safe-area-inset-top) + 68px));
  left: 50%;
  display: flex;
  width: max-content;
  max-width: calc(100vw - 32px);
  min-height: 42px;
  align-items: center;
  gap: 9px;
  padding: 0 14px;
  border: 1px solid rgba(242, 201, 109, 0.52);
  border-radius: 5px;
  background: rgba(17, 14, 8, 0.92);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.3), 0 0 22px rgba(242, 201, 109, 0.1);
  color: rgba(255, 239, 198, 0.9);
  font: 600 12px/1.45 var(--font-display);
  pointer-events: none;
  transform: translateX(-50%);
  backdrop-filter: blur(14px);
}

.session-expiry-notice[hidden],
.display-mode .session-expiry-notice {
  display: none !important;
}

.session-expiry-notice svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  color: var(--gold);
}

.session-expiry-notice strong {
  color: #fff1c7;
  font-family: var(--font-mono);
  font-size: 14px;
}

.kiosk-login-dock[hidden] {
  display: none !important;
}

.login-success-moment[hidden] {
  display: none !important;
}

.login-success-moment {
  position: fixed;
  z-index: 10;
  inset: 0;
  display: grid;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  place-items: center;
  isolation: isolate;
}

.login-success-moment::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(214, 244, 252, 0.18), rgba(81, 154, 180, 0.06) 24%, transparent 58%);
  content: "";
  opacity: 0;
}

.login-success-moment::after {
  position: absolute;
  z-index: -2;
  inset: 0;
  background: rgba(1, 4, 10, 0.36);
  -webkit-backdrop-filter: blur(3px) saturate(1.18);
  backdrop-filter: blur(3px) saturate(1.18);
  content: "";
  opacity: 0;
}

.login-success-moment[data-active="true"] {
  animation: login-success-moment 5.6s cubic-bezier(0.22, 0.72, 0.18, 1) both;
}

.login-success-moment[data-active="true"]::before {
  animation: login-success-flash 3.4s 680ms cubic-bezier(0.16, 0.78, 0.2, 1) both;
}

.login-success-moment[data-active="true"]::after {
  animation: login-success-veil 5.6s ease both;
}

.login-success-moment[data-mode="logout"]::before {
  background: radial-gradient(circle at 50% 50%, rgba(157, 211, 229, 0.12), rgba(34, 83, 102, 0.04) 24%, transparent 52%);
  animation-name: login-logout-flash;
}

.login-success-moment[data-mode="logout"] {
  animation-duration: 4.2s;
}

.login-success-moment[data-mode="logout"]::after {
  animation-duration: 4.2s;
}

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

.login-success-particles i {
  --particle-color: #ebfbff;
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--particle-size);
  height: var(--particle-size);
  border-radius: 50%;
  background: var(--particle-color);
  box-shadow:
    0 0 4px 1px #fff,
    0 0 13px 3px var(--particle-color),
    0 0 32px 6px color-mix(in srgb, var(--particle-color), transparent 48%);
  opacity: 0;
  transform: translate(calc(-50% + var(--from-x)), calc(-50% + var(--from-y))) scale(0.2);
  will-change: opacity, transform;
  animation: login-success-particle 4.35s var(--particle-delay) cubic-bezier(0.22, 0.72, 0.18, 1) both;
}

.login-success-particles i::before {
  position: absolute;
  top: 50%;
  left: 50%;
  width: calc(var(--particle-size) + 18px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--particle-color), white 22%) 0, color-mix(in srgb, var(--particle-color), transparent 54%) 24%, transparent 72%);
  content: "";
  opacity: 0.72;
  transform: translate(-50%, -50%);
}

.login-success-particles i::after {
  position: absolute;
  top: 50%;
  right: 50%;
  width: clamp(12px, 1.8vw, 32px);
  height: 1px;
  background: linear-gradient(to left, color-mix(in srgb, var(--particle-color), transparent 18%), transparent);
  content: "";
  opacity: 0.58;
  transform: translateY(-50%);
  transform-origin: right center;
}

.login-success-frame {
  position: absolute;
  z-index: 2;
  inset: clamp(42px, 7vw, 110px);
  opacity: 0;
  animation: login-success-frame 5.6s 180ms cubic-bezier(0.18, 0.74, 0.2, 1) both;
}

.frame-corner {
  position: absolute;
  width: clamp(38px, 4vw, 72px);
  height: clamp(38px, 4vw, 72px);
  border-color: rgba(190, 232, 244, 0.48);
  border-style: solid;
}

.corner-tl { top: 0; left: 0; border-width: 1px 0 0 1px; }
.corner-tr { top: 0; right: 0; border-width: 1px 1px 0 0; }
.corner-br { right: 0; bottom: 0; border-width: 0 1px 1px 0; }
.corner-bl { bottom: 0; left: 0; border-width: 0 0 1px 1px; }

.login-success-aura {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 50%;
  width: min(54vw, 760px);
  min-width: 480px;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
}

.login-success-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  border: 1px solid rgba(201, 238, 249, 0.7);
  border-radius: 50%;
  box-shadow: 0 0 24px rgba(106, 190, 219, 0.15), inset 0 0 18px rgba(106, 190, 219, 0.08);
  opacity: 0;
  transform: translate(-50%, -50%) scale(2.2);
}

.ring-near {
  width: 28%;
  aspect-ratio: 1;
  animation: login-success-ring-near 5.2s 180ms cubic-bezier(0.16, 0.78, 0.2, 1) both;
}

.ring-mid {
  width: 48%;
  aspect-ratio: 1;
  border-style: dashed;
  border-color: rgba(193, 233, 245, 0.44);
  animation: login-success-ring-mid 5.2s 80ms cubic-bezier(0.2, 0.72, 0.2, 1) both;
}

.ring-far {
  width: 72%;
  aspect-ratio: 1;
  border-color: rgba(168, 216, 234, 0.3);
  animation: login-success-ring-far 5.2s cubic-bezier(0.2, 0.68, 0.18, 1) both;
}

.login-success-moment[data-mode="logout"] .login-success-ring {
  border-color: rgba(181, 222, 234, 0.54);
  box-shadow: 0 0 20px rgba(106, 190, 219, 0.13), inset 0 0 14px rgba(106, 190, 219, 0.08);
  animation: login-logout-ring 2.2s cubic-bezier(0.2, 0.68, 0.2, 1) both;
}

.login-success-orbit {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 58%;
  aspect-ratio: 1;
  border: 1px solid rgba(168, 216, 234, 0.18);
  border-radius: 50%;
  opacity: 0;
  transform: translate(-50%, -50%) rotate(-54deg) scale(1.5);
  animation: login-success-orbit 5.2s 120ms cubic-bezier(0.16, 0.78, 0.2, 1) both;
}

.login-success-orbit i {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #effbff;
  box-shadow: 0 0 14px rgba(190, 236, 249, 0.95);
  transform: translate(-50%, -50%) rotate(var(--node-angle)) translateX(clamp(130px, 15.7vw, 220px));
}

.login-success-core {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #f3fcff;
  box-shadow:
    0 0 8px #fff,
    0 0 28px rgba(198, 239, 252, 0.98),
    0 0 82px rgba(105, 190, 219, 0.74);
  opacity: 0;
  transform: translate(-50%, -50%);
  animation: login-success-core 5.2s 360ms cubic-bezier(0.16, 0.8, 0.18, 1) both;
}

.login-success-moment[data-mode="logout"] .login-success-core {
  animation: login-logout-core 2.6s ease-out both;
}

.login-success-core::before,
.login-success-core::after {
  position: absolute;
  top: 50%;
  left: 50%;
  background: linear-gradient(to right, transparent, rgba(229, 248, 255, 0.96), transparent);
  content: "";
  transform: translate(-50%, -50%);
}

.login-success-core::before {
  width: clamp(150px, 20vw, 360px);
  height: 1px;
}

.login-success-core::after {
  width: clamp(100px, 13vw, 230px);
  height: 1px;
  transform: translate(-50%, -50%) rotate(90deg);
}

.login-success-reticle {
  position: absolute;
  top: 50%;
  left: 50%;
  background: linear-gradient(to right, transparent, rgba(208, 241, 250, 0.7), transparent);
  opacity: 0;
  transform: translate(-50%, -50%) scaleX(1.8);
  animation: login-success-reticle 4.8s 180ms cubic-bezier(0.16, 0.76, 0.2, 1) both;
}

.reticle-horizontal { width: 82%; height: 1px; }

.reticle-vertical {
  width: 66%;
  height: 1px;
  transform: translate(-50%, -50%) rotate(90deg) scaleX(1.8);
  animation-name: login-success-reticle-vertical;
}

.login-success-trail {
  position: absolute;
  top: 50%;
  left: 50%;
  width: clamp(34px, 4vw, 68px);
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(216, 245, 253, 0.86));
  opacity: 0;
  transform: rotate(var(--trail-angle)) translateX(var(--trail-distance)) scaleX(0.9);
  transform-origin: left center;
  animation: login-success-trail 2.1s var(--trail-delay) cubic-bezier(0.68, 0.02, 0.22, 1) both;
}

.login-success-moment[data-mode="logout"] .login-success-trail {
  background: linear-gradient(to right, transparent, rgba(190, 228, 239, 0.68));
  animation-name: login-logout-trail;
}

.login-success-copy {
  position: relative;
  z-index: 3;
  display: grid;
  justify-items: center;
  padding-top: clamp(150px, 21vh, 220px);
  font-family: var(--font-source-serif);
  text-align: center;
  text-shadow: 0 0 24px rgba(82, 165, 195, 0.56), 0 3px 18px rgba(0, 0, 0, 0.92);
  opacity: 0;
  transform: translateY(24px) scale(0.96);
  animation: login-success-copy 5.6s cubic-bezier(0.16, 0.76, 0.2, 1) both;
}

.login-success-copy p {
  margin: 0 0 12px;
  color: rgba(168, 216, 234, 0.82);
  font: 600 clamp(9px, 0.72vw, 13px)/1 var(--font-source-serif);
  letter-spacing: 0;
}

.login-success-copy h2 {
  margin: 0;
  color: #f1fbff;
  font: 600 clamp(30px, 3.4vw, 64px)/1.14 var(--font-source-serif);
}

.login-success-copy > span {
  margin-top: 16px;
  color: rgba(218, 239, 247, 0.72);
  font: 400 clamp(12px, 0.92vw, 17px)/1.5 var(--font-source-serif);
}

.login-success-progress {
  display: flex;
  width: clamp(150px, 13vw, 220px);
  gap: 7px;
  margin-top: 22px;
}

.login-success-progress i {
  width: 100%;
  height: 2px;
  background: rgba(168, 216, 234, 0.18);
  overflow: hidden;
}

.login-success-progress i::after {
  display: block;
  width: 100%;
  height: 100%;
  background: rgba(225, 247, 253, 0.82);
  content: "";
  transform: scaleX(0);
  transform-origin: left;
  animation: login-success-progress 5.6s cubic-bezier(0.2, 0.72, 0.2, 1) both;
}

.login-success-progress i:nth-child(2)::after { animation-delay: 160ms; }
.login-success-progress i:nth-child(3)::after { animation-delay: 320ms; }

.login-success-moment[data-mode="logout"] .login-success-frame,
.login-success-moment[data-mode="logout"] .login-success-particles,
.login-success-moment[data-mode="logout"] .login-success-orbit,
.login-success-moment[data-mode="logout"] .login-success-reticle,
.login-success-moment[data-mode="logout"] .login-success-progress {
  display: none;
}

.login-success-moment[data-mode="logout"] .login-success-copy {
  animation-duration: 4.2s;
}

.is-login-ritual .sky-root canvas {
  transform-origin: center;
  animation: login-success-sky 5.6s cubic-bezier(0.16, 0.78, 0.18, 1) both;
}

.is-login-ritual .site-header {
  opacity: 0;
}

.participant-mode .login-success-moment {
  display: none !important;
}

@keyframes login-success-moment {
  0% { opacity: 0; }
  5%, 86% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes login-success-veil {
  0% { opacity: 0; }
  10%, 76% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes login-success-flash {
  0%, 18% { opacity: 0; transform: scale(0.3); }
  32% { opacity: 0.92; transform: scale(0.64); }
  52% { opacity: 0.42; transform: scale(1.08); }
  100% { opacity: 0; transform: scale(1.46); }
}

@keyframes login-logout-flash {
  0% { opacity: 0; transform: scale(1.35); }
  28% { opacity: 0.72; }
  100% { opacity: 0; transform: scale(0.36); }
}

@keyframes login-success-frame {
  0% { opacity: 0; transform: scale(1.08); }
  20% { opacity: 0.54; transform: scale(1); }
  70% { opacity: 0.34; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.02); }
}

@keyframes login-success-particle {
  0% {
    opacity: 0;
    transform: translate(calc(-50% + var(--from-x)), calc(-50% + var(--from-y))) scale(0.2);
  }
  13% { opacity: 0.58; }
  35% {
    opacity: 1;
    transform: translate(calc(-50% + var(--cross-x)), calc(-50% + var(--cross-y))) scale(1.65);
  }
  43% {
    opacity: 0.92;
    transform: translate(-50%, -50%) scale(0.9);
  }
  70% { opacity: 0.42; }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--to-x)), calc(-50% + var(--to-y))) scale(0.15);
  }
}

@keyframes login-success-ring-near {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(2.35); }
  28% { opacity: 0.78; transform: translate(-50%, -50%) scale(0.88); }
  39% { opacity: 0.96; transform: translate(-50%, -50%) scale(1); }
  66% { opacity: 0.5; transform: translate(-50%, -50%) scale(1.04); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(2.08); }
}

@keyframes login-success-ring-mid {
  0% { opacity: 0; transform: translate(-50%, -50%) rotate(-34deg) scale(2); }
  25% { opacity: 0.56; transform: translate(-50%, -50%) rotate(18deg) scale(0.92); }
  42% { opacity: 0.82; transform: translate(-50%, -50%) rotate(54deg) scale(1); }
  72% { opacity: 0.34; transform: translate(-50%, -50%) rotate(112deg) scale(1.03); }
  100% { opacity: 0; transform: translate(-50%, -50%) rotate(156deg) scale(1.72); }
}

@keyframes login-success-ring-far {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(1.65); }
  30% { opacity: 0.38; transform: translate(-50%, -50%) scale(0.96); }
  48% { opacity: 0.58; transform: translate(-50%, -50%) scale(1); }
  78% { opacity: 0.22; transform: translate(-50%, -50%) scale(1.04); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.38); }
}

@keyframes login-logout-ring {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(2.15); }
  26% { opacity: 0.58; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(0.08); }
}

@keyframes login-success-core {
  0%, 24% { opacity: 0; transform: translate(-50%, -50%) scale(0.08); }
  34% { opacity: 1; transform: translate(-50%, -50%) scale(2.1); }
  46% { opacity: 0.94; transform: translate(-50%, -50%) scale(0.92); }
  72% { opacity: 0.84; transform: translate(-50%, -50%) scale(1.08); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(0.4); }
}

@keyframes login-logout-core {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(1.55); }
  24% { opacity: 0.82; transform: translate(-50%, -50%) scale(0.96); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(0.1); }
}

@keyframes login-success-trail {
  0% { opacity: 0; transform: rotate(var(--trail-angle)) translateX(var(--trail-distance)) scaleX(0.95); }
  24% { opacity: 0.74; }
  72% { opacity: 0.94; }
  100% { opacity: 0; transform: rotate(var(--trail-angle)) translateX(12px) scaleX(0.08); }
}

@keyframes login-logout-trail {
  0% { opacity: 0; transform: rotate(var(--trail-angle)) translateX(var(--trail-distance)) scaleX(0.88); }
  24% { opacity: 0.62; }
  100% { opacity: 0; transform: rotate(var(--trail-angle)) translateX(18px) scaleX(0.1); }
}

@keyframes login-success-copy {
  0%, 36% { opacity: 0; transform: translateY(24px) scale(0.96); }
  48%, 82% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-10px) scale(1.01); }
}

@keyframes login-success-orbit {
  0% { opacity: 0; transform: translate(-50%, -50%) rotate(-54deg) scale(1.5); }
  22% { opacity: 0.45; }
  42% { opacity: 0.82; transform: translate(-50%, -50%) rotate(8deg) scale(1); }
  76% { opacity: 0.5; transform: translate(-50%, -50%) rotate(52deg) scale(1.02); }
  100% { opacity: 0; transform: translate(-50%, -50%) rotate(78deg) scale(1.34); }
}

@keyframes login-success-reticle {
  0% { opacity: 0; transform: translate(-50%, -50%) scaleX(1.8); }
  24% { opacity: 0.38; }
  42% { opacity: 0.72; transform: translate(-50%, -50%) scaleX(0.34); }
  65% { opacity: 0.3; transform: translate(-50%, -50%) scaleX(0.28); }
  100% { opacity: 0; transform: translate(-50%, -50%) scaleX(0.6); }
}

@keyframes login-success-reticle-vertical {
  0% { opacity: 0; transform: translate(-50%, -50%) rotate(90deg) scaleX(1.8); }
  24% { opacity: 0.38; }
  42% { opacity: 0.72; transform: translate(-50%, -50%) rotate(90deg) scaleX(0.34); }
  65% { opacity: 0.3; transform: translate(-50%, -50%) rotate(90deg) scaleX(0.28); }
  100% { opacity: 0; transform: translate(-50%, -50%) rotate(90deg) scaleX(0.6); }
}

@keyframes login-success-progress {
  0%, 42% { transform: scaleX(0); }
  58%, 86% { transform: scaleX(1); }
  100% { opacity: 0; transform: scaleX(1); }
}

@keyframes login-success-sky {
  0% { transform: scale(1); }
  26% { transform: scale(1.018); }
  44% { transform: scale(1.052); }
  72% { transform: scale(1.036); }
  100% { transform: scale(1.012); }
}

.is-launching .site-header {
  opacity: 0.24;
}

.is-touring .site-header {
  opacity: 0.34;
}

.is-touring .mountains {
  opacity: 0;
  transform: translateY(110%);
}

.observatory {
  position: fixed;
  z-index: 4;
  inset: 0;
  pointer-events: none;
}

.wish-station {
  position: absolute;
  right: 0;
  bottom: clamp(38px, 7vh, 130px);
  left: 0;
  display: none;
  align-items: center;
  justify-content: center;
  gap: clamp(18px, 2vw, 38px);
  padding: 0 clamp(18px, 4vw, 70px);
  pointer-events: auto;
  transition: opacity 420ms ease, transform 520ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.participant-mode .wish-station {
  display: flex;
}

.display-mode .wish-station {
  display: none;
}

.is-launching .wish-station {
  opacity: 0;
  pointer-events: none;
  transform: translateY(28px);
}

.wish-beacon {
  position: relative;
  width: clamp(54px, 4.2vw, 82px);
  aspect-ratio: 1;
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  border-radius: 50%;
  outline: none;
  background: transparent;
  color: var(--cyan-bright);
  filter: drop-shadow(0 0 20px rgba(168, 216, 234, 0.44));
  touch-action: manipulation;
  transition: filter 180ms ease, transform 180ms ease;
}

.wish-beacon:hover {
  filter: drop-shadow(0 0 30px rgba(168, 216, 234, 0.72));
  transform: scale(1.06);
}

.wish-beacon:focus-visible {
  outline: 1px solid rgba(229, 248, 255, 0.82);
  outline-offset: 7px;
}

.beacon-label {
  position: absolute;
  bottom: calc(100% + 7px);
  left: 50%;
  width: max-content;
  color: rgba(229, 248, 255, 0.68);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 0.12em;
  pointer-events: none;
  text-shadow: 0 0 13px rgba(168, 216, 234, 0.72);
  transform: translateX(-50%);
}

.beacon-core {
  position: absolute;
  inset: 34%;
  border-radius: 50%;
  background: var(--cyan-bright);
  box-shadow: 0 0 12px #fff, 0 0 34px rgba(168, 216, 234, 0.9), 0 0 70px rgba(168, 216, 234, 0.4);
  animation: beacon-breathe 2.4s ease-in-out infinite;
}

.beacon-orbit,
.wish-beacon::before,
.wish-beacon::after {
  position: absolute;
  border: 1px solid rgba(168, 216, 234, 0.3);
  border-radius: 50%;
  content: "";
}

.beacon-orbit { inset: 17%; animation: beacon-ring 3s ease-out infinite; }
.wish-beacon::before { inset: 4%; opacity: 0.4; }
.wish-beacon::after { inset: 44% -12%; border-right-color: transparent; border-left-color: transparent; }

.wish-beacon .beacon-core,
.wish-beacon .beacon-orbit {
  pointer-events: none;
}

.is-charging .wish-beacon {
  animation: beacon-charge 800ms cubic-bezier(0.55, 0, 0.9, 0.45) both;
}

.wish-composer {
  display: grid;
  grid-template-columns: minmax(96px, 0.25fr) 1px minmax(280px, 1fr) 46px auto;
  width: min(74vw, 980px);
  min-height: 62px;
  align-items: center;
  overflow: hidden;
  border: 1px solid rgba(168, 216, 234, 0.25);
  border-radius: 6px;
  background: rgba(4, 8, 16, 0.78);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.3), inset 0 1px rgba(255, 255, 255, 0.025);
  backdrop-filter: blur(18px);
}

.wish-composer input {
  height: 60px;
  padding: 0 20px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #eef8fb;
  box-shadow: none;
  font-size: clamp(13px, 0.9vw, 17px);
}

.wish-composer input:focus {
  background: rgba(168, 216, 234, 0.035);
  box-shadow: none;
}

.wish-composer input::placeholder { color: rgba(209, 229, 237, 0.38); }

.composer-divider {
  width: 1px;
  height: 28px;
  background: rgba(168, 216, 234, 0.18);
}

.wish-composer button {
  display: inline-flex;
  height: 46px;
  align-items: center;
  gap: 10px;
  margin-right: 8px;
  padding: 0 19px;
  border: 1px solid rgba(168, 216, 234, 0.68);
  border-radius: 5px;
  background: rgba(168, 216, 234, 0.12);
  color: var(--cyan-bright);
  font-weight: 700;
  transition: background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.wish-composer button:hover:not(:disabled) {
  background: rgba(168, 216, 234, 0.2);
  box-shadow: 0 0 26px rgba(168, 216, 234, 0.12);
  transform: translateY(-1px);
}

.wish-composer button svg { width: 17px; height: 17px; }
.wish-composer button:disabled { opacity: 0.52; }

.wish-composer .wish-preset-roll {
  display: grid;
  width: 38px;
  height: 38px;
  margin: 0 4px;
  padding: 0;
  border-color: rgba(168, 216, 234, 0.24);
  background: rgba(168, 216, 234, 0.045);
  color: rgba(229, 248, 255, 0.76);
  place-items: center;
}

.wish-composer .wish-preset-roll:hover:not(:disabled) {
  border-color: rgba(168, 216, 234, 0.64);
  background: rgba(168, 216, 234, 0.14);
  color: var(--cyan-bright);
}

.wish-preset-roll.is-rolling svg {
  animation: preset-roll 480ms cubic-bezier(0.22, 0.8, 0.3, 1);
}

@keyframes preset-roll {
  0% { transform: rotate(0) scale(0.82); opacity: 0.5; }
  55% { transform: rotate(180deg) scale(1.08); opacity: 1; }
  100% { transform: rotate(360deg) scale(1); opacity: 1; }
}

.honeypot {
  position: fixed !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
}

.form-message {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  width: min(86vw, 720px);
  margin: 0;
  color: #ffc0bb;
  font-size: 12px;
  text-align: center;
  transform: translateX(-50%);
}

.nebula-guide-dialog {
  --guide-color: var(--cyan);
  width: min(760px, calc(100vw - 28px));
  max-width: none;
  max-height: min(82dvh, 760px);
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--guide-color), transparent 58%);
  border-radius: 8px;
  outline: none;
  background:
    radial-gradient(circle at 86% 4%, color-mix(in srgb, var(--guide-color), transparent 83%), transparent 34%),
    linear-gradient(145deg, rgba(7, 13, 24, 0.98), rgba(3, 7, 14, 0.97));
  color: #eef8fb;
  box-shadow:
    0 34px 120px rgba(0, 0, 0, 0.74),
    0 0 70px color-mix(in srgb, var(--guide-color), transparent 88%);
  user-select: text;
}

.nebula-guide-dialog::backdrop {
  background: rgba(1, 3, 8, 0.76);
  backdrop-filter: blur(7px);
}

.nebula-guide-dialog[open] {
  animation: guide-dialog-in 320ms cubic-bezier(0.2, 0.82, 0.24, 1) both;
}

.kiosk-login-dock {
  position: fixed;
  z-index: 7;
  right: clamp(12px, 1vw, 20px);
  bottom: clamp(18px, 2.2vh, 36px);
  width: clamp(170px, 10.9vw, 210px);
  padding: clamp(10px, 0.65vw, 13px);
  border: 1px solid rgba(168, 216, 234, 0.23);
  border-radius: 6px;
  background: rgba(4, 8, 15, 0.82);
  color: #e0eff5;
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.42), 0 0 28px rgba(97, 176, 204, 0.08);
  pointer-events: auto;
  backdrop-filter: blur(14px);
}

.kiosk-login-heading {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 10px;
}

.kiosk-login-heading > svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  color: var(--cyan-bright);
}

.kiosk-login-heading strong,
.kiosk-login-heading span {
  display: block;
}

.kiosk-login-heading strong {
  font: 650 14px/1.1 var(--font-display);
}

.kiosk-login-heading span {
  margin-top: 3px;
  color: rgba(168, 216, 234, 0.46);
  font: 650 9px/1 var(--font-mono);
}

.kiosk-qr-frame {
  position: relative;
  display: grid;
  width: 100%;
  aspect-ratio: 1;
  border: 1px solid rgba(168, 216, 234, 0.28);
  background: #f4fafc;
  place-items: center;
  overflow: hidden;
}

.kiosk-qr-frame img {
  position: absolute;
  inset: 5px;
  width: calc(100% - 10px);
  height: calc(100% - 10px);
  max-width: none;
  object-fit: contain;
}

.kiosk-login-loading {
  width: 32px;
  height: 32px;
  color: #2c809d;
  animation: kiosk-login-spin 1s linear infinite;
}

.kiosk-login-dock:not([data-login-state="loading"]) .kiosk-login-loading {
  display: none !important;
}

.kiosk-login-dock > p {
  min-height: 15px;
  margin: 9px 0 0;
  color: rgba(224, 239, 245, 0.66);
  font: 500 11px/1.35 var(--font-mono);
  text-align: center;
}

.kiosk-login-user {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #f4fafc;
  color: #153745;
  text-align: center;
}

.kiosk-login-user > svg {
  width: 36px;
  height: 36px;
  color: #2c809d;
}

.kiosk-login-exit-icon {
  display: none !important;
}

.kiosk-login-dock[data-login-state="logged-out"] .kiosk-login-success-icon {
  display: none !important;
}

.kiosk-login-dock[data-login-state="logged-out"] .kiosk-login-exit-icon {
  display: block !important;
}

.kiosk-login-user strong {
  max-width: calc(100% - 18px);
  font: 650 14px/1.3 var(--font-display);
  overflow-wrap: anywhere;
}

.kiosk-login-retry {
  position: absolute;
  top: 7px;
  right: 7px;
  display: grid;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid rgba(168, 216, 234, 0.24);
  border-radius: 4px;
  background: rgba(5, 8, 16, 0.9);
  color: #e0eff5;
  place-items: center;
}

.kiosk-login-retry svg {
  width: 18px;
  height: 18px;
}

@keyframes kiosk-login-spin {
  to { transform: rotate(360deg); }
}

.nebula-guide-shell {
  display: grid;
  max-height: min(82dvh, 760px);
  grid-template-rows: auto auto minmax(0, 1fr) auto;
}

.nebula-guide-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 26px 18px;
  border-bottom: 1px solid rgba(218, 238, 246, 0.09);
}

.nebula-guide-header span {
  display: block;
  margin-bottom: 7px;
  color: color-mix(in srgb, var(--guide-color), white 18%);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.nebula-guide-header h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(28px, 4.4vw, 46px);
  font-weight: 620;
  line-height: 1.05;
}

.nebula-guide-header > button {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  padding: 0;
  border: 1px solid rgba(218, 238, 246, 0.14);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.035);
  color: rgba(229, 248, 255, 0.72);
  place-items: center;
}

.nebula-guide-header > button:hover {
  border-color: color-mix(in srgb, var(--guide-color), transparent 34%);
  background: color-mix(in srgb, var(--guide-color), transparent 88%);
}

.nebula-guide-header svg {
  width: 17px;
  height: 17px;
}

.nebula-guide-tabs {
  display: flex;
  gap: 8px;
  padding: 13px 18px;
  overflow-x: auto;
  border-bottom: 1px solid rgba(218, 238, 246, 0.08);
  scrollbar-width: none;
}

.nebula-guide-tabs::-webkit-scrollbar {
  display: none;
}

.nebula-guide-tabs button {
  min-width: max-content;
  padding: 7px 11px;
  border: 1px solid rgba(218, 238, 246, 0.11);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
  color: rgba(218, 238, 246, 0.48);
  font-size: 11px;
  white-space: nowrap;
}

.nebula-guide-tabs button.active {
  border-color: color-mix(in srgb, var(--guide-color), transparent 32%);
  background: color-mix(in srgb, var(--guide-color), transparent 86%);
  color: #f2fbff;
  box-shadow: 0 0 20px color-mix(in srgb, var(--guide-color), transparent 88%);
}

.nebula-guide-content {
  padding: 24px 26px 28px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.nebula-guide-heading {
  display: grid;
  grid-template-columns: minmax(130px, 0.32fr) minmax(0, 1fr);
  gap: 24px;
  align-items: end;
}

.nebula-guide-heading > div {
  display: grid;
  gap: 5px;
}

.nebula-guide-heading strong {
  color: var(--guide-color);
  font-family: var(--font-mono);
  font-size: 18px;
  letter-spacing: 0.08em;
}

.nebula-guide-heading span {
  color: rgba(218, 238, 246, 0.38);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.nebula-guide-heading p {
  margin: 0;
  color: rgba(239, 249, 252, 0.92);
  font-family: var(--font-display);
  font-size: clamp(17px, 2.5vw, 24px);
  font-weight: 540;
  line-height: 1.45;
}

.nebula-guide-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 24px 0 0;
}

.nebula-guide-meta > div {
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid rgba(218, 238, 246, 0.09);
  background: rgba(255, 255, 255, 0.022);
}

.nebula-guide-meta dt {
  margin-bottom: 5px;
  color: rgba(218, 238, 246, 0.38);
  font-size: 9px;
}

.nebula-guide-meta dd {
  margin: 0;
  color: rgba(239, 249, 252, 0.84);
  font-size: 12px;
  line-height: 1.45;
}

.nebula-guide-summary {
  margin: 22px 0 0;
  color: rgba(223, 239, 245, 0.72);
  font-size: 14px;
  line-height: 1.9;
}

.nebula-guide-facts {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(218, 238, 246, 0.09);
}

.nebula-guide-facts h3 {
  margin: 0 0 11px;
  color: color-mix(in srgb, var(--guide-color), white 20%);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
}

.nebula-guide-facts ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nebula-guide-facts li {
  position: relative;
  padding-left: 17px;
  color: rgba(223, 239, 245, 0.66);
  font-size: 12px;
  line-height: 1.6;
}

.nebula-guide-facts li::before {
  position: absolute;
  top: 0.72em;
  left: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--guide-color);
  box-shadow: 0 0 10px var(--guide-color);
  content: "";
}

.nebula-guide-footer {
  padding: 13px 26px 15px;
  border-top: 1px solid rgba(218, 238, 246, 0.08);
  color: rgba(218, 238, 246, 0.34);
  font-size: 10px;
  line-height: 1.5;
}

@keyframes guide-dialog-in {
  from { opacity: 0; transform: translateY(18px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.wish-result {
  --rarity-color: var(--cyan);
  position: absolute;
  right: clamp(18px, 4vw, 76px);
  bottom: clamp(24px, 5vh, 90px);
  width: min(560px, calc(100vw - 36px));
  padding: clamp(22px, 2vw, 34px);
  border-top: 1px solid color-mix(in srgb, var(--rarity-color), transparent 32%);
  background: rgba(4, 7, 14, 0.82);
  box-shadow: 0 26px 90px rgba(0, 0, 0, 0.46);
  pointer-events: auto;
  backdrop-filter: blur(20px);
}

.wish-result blockquote,
.star-inspector blockquote {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.wish-result blockquote {
  max-height: min(36vh, 320px);
  overflow-y: auto;
}

.wish-result.visible {
  animation: result-enter 720ms cubic-bezier(0.18, 0.9, 0.22, 1.22) both;
}

.result-rarity {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--rarity-color);
  font-family: var(--font-mono);
  font-size: 11px;
}

.result-rarity span {
  width: 7px;
  height: 7px;
  background: currentColor;
  box-shadow: 0 0 14px currentColor;
  transform: rotate(45deg);
}

.wish-result blockquote {
  margin: 16px 0 12px;
  font-family: var(--font-display);
  font-size: clamp(24px, 2.1vw, 38px);
  font-weight: 650;
  line-height: 1.4;
}

.result-author {
  display: flex;
  gap: 8px;
  margin: 0;
  color: rgba(224, 239, 245, 0.48);
  font-size: 12px;
}

.result-author strong { color: rgba(238, 248, 251, 0.82); }
.result-author span { margin-left: auto; font-family: var(--font-mono); }

.result-nebula {
  display: flex;
  align-items: baseline;
  gap: 9px;
  margin: 18px 0 16px;
  color: rgba(224, 239, 245, 0.4);
  font-size: 11px;
}

.result-nebula strong {
  color: var(--rarity-color);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
}

.wish-result > button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  gap: 8px;
  padding: 0 13px;
  border: 1px solid rgba(168, 216, 234, 0.2);
  border-radius: 5px;
  background: transparent;
  color: rgba(224, 239, 245, 0.76);
}

.wish-result > button svg { width: 15px; }

.star-inspector {
  --rarity-color: var(--cyan);
  position: absolute;
  top: 50%;
  left: clamp(22px, 4vw, 76px);
  width: min(430px, calc(100vw - 44px));
  padding: 18px 42px 18px 20px;
  border-left: 1px solid var(--rarity-color);
  background: rgba(4, 7, 14, 0.74);
  pointer-events: auto;
  transform: translateY(-50%);
  backdrop-filter: blur(14px);
}

.star-inspector > button {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(224, 239, 245, 0.52);
  place-items: center;
}

.star-inspector > button svg { width: 16px; }
.star-inspector > span { color: var(--rarity-color); font-family: var(--font-mono); font-size: 10px; }
.star-inspector blockquote { margin: 11px 0; font-size: clamp(18px, 1.5vw, 27px); line-height: 1.45; }
.star-inspector p { margin: 0; color: rgba(224, 239, 245, 0.48); font-size: 11px; }

.display-mode .is-touring .star-inspector {
  top: auto;
  bottom: clamp(38px, 7vh, 112px);
  left: 50%;
  width: min(720px, 58vw);
  padding: 22px 54px 22px 24px;
  border-top: 1px solid var(--rarity-color);
  border-left: 0;
  background: linear-gradient(110deg, rgba(4, 7, 14, 0.84), rgba(4, 7, 14, 0.58));
  box-shadow: 0 18px 65px rgba(0, 0, 0, 0.36), 0 -8px 34px rgba(168, 216, 234, 0.06);
  transform: translate(-50%, 0);
  animation: tour-card-in 620ms cubic-bezier(0.2, 0.82, 0.24, 1) both;
}

.display-mode .is-touring .star-inspector blockquote {
  margin: 13px 0 8px;
  font-size: clamp(20px, 1.8vw, 32px);
}

.display-mode .is-touring .star-inspector > button {
  display: none;
}

.display-mode .is-live-wish .star-inspector {
  top: auto;
  bottom: clamp(38px, 6.5vh, 104px);
  left: 50%;
  width: min(980px, 72vw);
  padding: clamp(24px, 2.2vw, 42px) clamp(28px, 3vw, 58px);
  border-top: 1px solid var(--nebula-color, var(--rarity-color));
  border-left: 0;
  background: linear-gradient(110deg, rgba(3, 6, 13, 0.92), rgba(3, 7, 15, 0.68));
  box-shadow:
    0 24px 90px rgba(0, 0, 0, 0.52),
    0 -10px 48px color-mix(in srgb, var(--nebula-color, var(--rarity-color)), transparent 88%);
  pointer-events: none;
  transform: translateX(-50%);
  animation: live-wish-card-in 680ms cubic-bezier(0.18, 0.86, 0.2, 1) both;
}

.display-mode .is-live-wish .star-inspector > button {
  display: none;
}

.display-mode .is-live-wish .star-inspector > span {
  color: var(--nebula-color, var(--rarity-color));
  font-size: clamp(11px, 0.72vw, 15px);
}

.display-mode .is-live-wish .star-inspector blockquote {
  margin: clamp(14px, 1.2vw, 24px) 0 12px;
  font-family: var(--font-display);
  font-size: clamp(28px, 2.3vw, 52px);
  font-weight: 620;
  line-height: 1.4;
}

.display-mode .is-live-wish .star-inspector p {
  color: rgba(238, 248, 251, 0.74);
  font-size: clamp(13px, 0.92vw, 19px);
}

@keyframes tour-card-in {
  from { opacity: 0; transform: translate(-50%, 18px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

@keyframes live-wish-card-in {
  from { opacity: 0; transform: translate(-50%, 24px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.connection-state {
  position: fixed;
  z-index: 5;
  bottom: clamp(18px, 2.8vw, 54px);
  left: clamp(20px, 4vw, 76px);
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(224, 239, 245, 0.38);
  font-family: var(--font-mono);
  font-size: 9px;
  pointer-events: none;
}

.connection-state span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #d3706b;
}

.connection-state.online span { background: var(--cyan); box-shadow: 0 0 9px var(--cyan); }
.connection-state b { font-weight: 500; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@keyframes beacon-breathe {
  0%, 100% { opacity: 0.72; transform: scale(0.86); }
  50% { opacity: 1; transform: scale(1.12); }
}

@keyframes beacon-ring {
  0% { opacity: 0.72; transform: scale(0.52); }
  72%, 100% { opacity: 0; transform: scale(1.4); }
}

@keyframes beacon-charge {
  0% { filter: drop-shadow(0 0 20px rgba(168, 216, 234, 0.44)); transform: scale(1); }
  72% { filter: drop-shadow(0 0 50px rgba(229, 248, 255, 0.9)); transform: scale(1.22); }
  100% { filter: drop-shadow(0 0 4px rgba(229, 248, 255, 0.9)); transform: scale(0.12); }
}

@keyframes radial-flash {
  0% { opacity: 0; }
  18% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes result-enter {
  from { opacity: 0; transform: translateY(46px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 720px) {
  .site-header { padding: 20px 18px; }
  .star-sigil { width: 25px; height: 25px; }
  .star-sigil::before { height: 24px; }
  .star-sigil::after { width: 24px; }
  .brand-lockup { gap: 10px; }
  .brand-lockup h1 { font-size: 20px; }
  .sky-count span { display: none; }
  .sky-count strong { font-size: 28px; }
  .site-actions { gap: 10px; }
  .participant-logout { width: 34px; height: 34px; }
  .participant-account { min-height: 32px; padding: 0 10px; }
  .session-countdown-display {
    min-width: 104px;
    height: 32px;
    gap: 6px;
    padding: 0 9px;
  }

  .session-countdown-display strong { font-size: 14px; }

  .wish-station {
    bottom: max(26px, env(safe-area-inset-bottom));
    flex-direction: column;
    gap: 10px;
    padding: 0 14px;
  }

  .wish-beacon { width: 54px; }
  .wish-composer {
    grid-template-columns: 92px 1px minmax(0, 1fr) 46px;
    width: 100%;
    min-height: 112px;
  }

  .wish-composer input { height: 56px; padding: 0 14px; font-size: 13px; }
  .wish-composer button { grid-column: 1 / -1; width: calc(100% - 12px); height: 44px; justify-content: center; margin: 0 6px 6px; }
  .wish-composer .wish-preset-roll {
    grid-column: 4;
    grid-row: 1;
    width: 38px;
    height: 38px;
    margin: 0 4px;
  }
  .wish-composer #submit-button { grid-column: 1 / -1; grid-row: 2; }
  .composer-divider { height: 25px; }
  .form-message { top: calc(100% + 6px); }
  .connection-state { display: none; }

  .wish-result {
    right: 12px;
    bottom: max(12px, env(safe-area-inset-bottom));
    left: 12px;
    width: auto;
    padding: 20px;
  }

  .wish-result blockquote { font-size: 25px; }
  .star-inspector {
    top: auto;
    right: 14px;
    bottom: calc(max(26px, env(safe-area-inset-bottom)) + 184px);
    left: 14px;
    width: auto;
    max-height: calc(100dvh - 250px);
    overflow-y: auto;
    transform: none;
  }
  .display-mode .star-inspector { bottom: max(24px, env(safe-area-inset-bottom)); }
  .mountains { min-height: 110px; }

  .nebula-guide-dialog {
    width: calc(100vw - 20px);
    max-height: calc(100dvh - 28px);
    border-radius: 8px;
  }

  .nebula-guide-shell {
    max-height: calc(100dvh - 28px);
  }

  .nebula-guide-header {
    padding: 20px 18px 15px;
  }

  .nebula-guide-header h2 {
    font-size: 30px;
  }

  .nebula-guide-tabs {
    padding: 11px 14px;
  }

  .nebula-guide-content {
    padding: 20px 18px 24px;
  }

  .nebula-guide-heading {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .nebula-guide-meta {
    grid-template-columns: 1fr;
    gap: 7px;
    margin-top: 19px;
  }

  .nebula-guide-meta > div {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    align-items: baseline;
    padding: 10px 12px;
  }

  .nebula-guide-meta dt {
    margin: 0;
  }

  .nebula-guide-footer {
    padding: 11px 18px 13px;
  }
}

@media (max-width: 420px) {
  .participant-mode .brand-lockup { gap: 7px; }
  .participant-mode .session-countdown-display {
    min-width: 70px;
    padding: 0 7px;
  }
  .participant-mode .session-countdown-display > span,
  .participant-mode .session-countdown-display svg {
    display: none;
  }
  .participant-mode .session-countdown-display strong {
    min-width: 48px;
    text-align: center;
  }
}

@media (max-width: 350px) {
  .participant-mode .participant-phone,
  .participant-mode .participant-account-divider {
    display: none;
  }
}

@media (orientation: landscape) and (max-height: 520px) {
  .participant-mode .site-header { padding: 14px 18px; }
  .participant-mode .star-sigil { width: 26px; height: 26px; }
  .participant-mode .star-sigil::before { height: 24px; }
  .participant-mode .star-sigil::after { width: 24px; }
  .participant-mode .brand-lockup { gap: 10px; }
  .participant-mode .brand-lockup h1 { font-size: 20px; }

  .participant-mode .wish-station {
    bottom: max(12px, env(safe-area-inset-bottom));
    gap: 14px;
    padding: 0 16px;
  }

  .participant-mode .wish-beacon { width: 48px; }
  .participant-mode .wish-composer {
    width: min(78vw, 720px);
    min-height: 52px;
    grid-template-columns: minmax(82px, 0.23fr) 1px minmax(220px, 1fr) 44px auto;
  }

  .participant-mode .wish-composer input {
    height: 50px;
    padding: 0 15px;
    font-size: 13px;
  }

  .participant-mode .wish-composer button {
    grid-column: auto;
    width: auto;
    height: 40px;
    margin-right: 6px;
    padding: 0 14px;
  }

  .participant-mode .wish-composer .wish-preset-roll {
    grid-column: 4;
    width: 36px;
    height: 36px;
    margin: 0 2px;
    padding: 0;
  }

  .participant-mode .form-message { top: auto; bottom: calc(100% + 7px); }
  .participant-mode .connection-state { display: none; }
  .participant-mode .star-inspector {
    left: 18px;
    width: min(380px, 48vw);
  }

  .participant-mode .wish-result {
    right: 14px;
    bottom: max(12px, env(safe-area-inset-bottom));
    width: min(460px, calc(100vw - 28px));
    padding: 16px 18px;
  }

  .participant-mode .wish-result blockquote {
    margin: 10px 0 8px;
    font-size: 21px;
  }

  .participant-mode .result-nebula { margin: 12px 0 10px; }

  .participant-mode .beacon-label {
    bottom: calc(100% + 4px);
    font-size: 8px;
  }

  .nebula-guide-dialog {
    width: min(780px, calc(100vw - 20px));
    max-height: calc(100dvh - 16px);
  }

  .nebula-guide-shell {
    max-height: calc(100dvh - 16px);
  }

  .nebula-guide-header {
    padding: 14px 18px 11px;
  }

  .nebula-guide-header span {
    margin-bottom: 3px;
  }

  .nebula-guide-header h2 {
    font-size: 25px;
  }

  .nebula-guide-header > button {
    width: 34px;
    height: 34px;
  }

  .nebula-guide-tabs {
    padding: 8px 14px;
  }

  .nebula-guide-tabs button {
    padding: 5px 9px;
    font-size: 10px;
  }

  .nebula-guide-content {
    padding: 14px 18px 18px;
  }

  .nebula-guide-heading {
    grid-template-columns: minmax(118px, 0.28fr) minmax(0, 1fr);
    gap: 18px;
  }

  .nebula-guide-heading p {
    font-size: 17px;
  }

  .nebula-guide-meta {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 13px;
  }

  .nebula-guide-meta > div {
    display: block;
    padding: 8px 10px;
  }

  .nebula-guide-meta dt {
    margin-bottom: 3px;
  }

  .nebula-guide-summary {
    margin-top: 13px;
    font-size: 12px;
    line-height: 1.65;
  }

  .nebula-guide-facts {
    margin-top: 13px;
    padding-top: 12px;
  }

  .nebula-guide-footer {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .beacon-core,
  .beacon-orbit,
  .wish-beacon,
  .reveal-flash,
  .wish-result.visible {
    animation: none !important;
  }

  .login-success-moment[data-active="true"],
  .login-success-moment[data-active="true"]::before,
  .login-success-moment[data-active="true"]::after,
  .login-success-moment[data-active="true"] .login-success-frame,
  .login-success-moment[data-active="true"] .login-success-particles i,
  .login-success-moment[data-active="true"] .login-success-aura *,
  .login-success-moment[data-active="true"] .login-success-copy,
  .is-login-ritual .sky-root canvas {
    animation: none !important;
  }

  .login-success-moment[data-active="true"],
  .login-success-moment[data-active="true"] .login-success-copy {
    opacity: 1;
    transform: none;
  }

  .login-success-particles {
    display: none;
  }
}
