:root {
  --bg: #0a0f10;
  --bg-soft: #11181a;
  --text-main: #f5f5f2;
  --text-soft: rgba(245, 245, 242, 0.7);
  --line-soft: rgba(255, 255, 255, 0.1);
  --accent: #d9f99d;
  --accent-strong: #fef08a;
  --panel: rgba(10, 15, 16, 0.78);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 50% 18%, rgba(217, 249, 157, 0.16), transparent 24%),
    radial-gradient(circle at 50% 42%, rgba(254, 240, 138, 0.08), transparent 30%),
    linear-gradient(180deg, var(--bg-soft), var(--bg));
  color: var(--text-main);
}

body {
  min-height: 100vh;
  min-height: 100dvh;
}

body.experience-active {
  background: #000;
}

.app-shell {
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  overflow: hidden;
}

.view {
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.view.hidden {
  opacity: 0;
  pointer-events: none;
  transform: scale(1.05);
}

/* Landing Screen */
#landingScreen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
   min-height: 100vh;
   min-height: 100dvh;
   padding: 32px 24px;
   text-align: center;
   z-index: 10;
}

#landingScreen::before,
#landingScreen::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  filter: blur(54px);
  pointer-events: none;
  opacity: 0.55;
}

#landingScreen::before {
  width: min(46vw, 320px);
  height: min(46vw, 320px);
  background: rgba(217, 249, 157, 0.16);
  top: 14%;
  left: 50%;
  transform: translateX(-50%);
  animation: glowFloat 6s ease-in-out infinite;
}

#landingScreen::after {
  width: min(38vw, 240px);
  height: min(38vw, 240px);
  background: rgba(254, 240, 138, 0.1);
  bottom: 18%;
  left: 50%;
  transform: translateX(-50%);
  animation: glowPulse 7s ease-in-out infinite;
}

.hero {
  max-width: 480px;
  margin-bottom: 24px;
}

.hero h1 {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(3.2rem, 10vw, 5.4rem);
  line-height: 0.92;
  font-weight: 600;
  background: linear-gradient(to bottom, #fffdf5, rgba(245, 245, 242, 0.75));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.loading-container {
  width: min(280px, 78vw);
  margin-bottom: 28px;
}

.progress-track {
  height: 3px;
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-strong));
  box-shadow: 0 0 18px rgba(217, 249, 157, 0.5);
  transition: width 0.3s ease;
}

.progress-caption {
  margin-top: 10px;
  font-size: 0.84rem;
  color: var(--text-soft);
  letter-spacing: 0.03em;
}

.btn-start {
  appearance: none;
  background: transparent;
  color: var(--text-main);
  border: 1px solid rgba(255, 255, 255, 0.16);
  padding: 15px 34px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow);
  opacity: 1;
}

.btn-start:disabled {
  color: rgba(255, 255, 255, 0.28);
  border-color: rgba(255, 255, 255, 0.08);
  cursor: not-allowed;
  box-shadow: none;
}

.btn-start:not(:disabled):hover {
  transform: translateY(-2px);
  border-color: rgba(217, 249, 157, 0.5);
  background: rgba(255, 255, 255, 0.03);
}

/* Experience Viewer */
#experienceViewer {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  z-index: 100;
  background: #000;
}

#arScene {
  width: 100%;
  height: 100%;
}

.status-panel {
  position: absolute;
  z-index: 110;
  backdrop-filter: blur(12px);
}

.status-panel {
  top: calc(env(safe-area-inset-top, 0px) + 16px);
  left: 50%;
  transform: translateX(-50%);
  padding: 7px 12px;
  background: rgba(0, 0, 0, 0.24);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 10px;
  backdrop-filter: blur(6px);
}

.status-label {
  margin: 0;
  font-size: 0.65rem;
  text-transform: uppercase;
  color: var(--accent-strong);
}

.debug-panel {
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + 58px);
  left: 16px;
  z-index: 110;
  width: min(360px, calc(100vw - 32px));
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(217, 249, 157, 0.12);
  background: rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(10px);
}

.debug-title {
  margin: 0 0 8px;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(245, 245, 242, 0.64);
}

.debug-panel pre {
  margin: 0;
  max-height: 28vh;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: "SFMono-Regular", "Menlo", monospace;
  font-size: 0.7rem;
  line-height: 1.45;
  color: rgba(245, 245, 242, 0.86);
}

.instruction-card {
  position: absolute;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 32px);
  transform: translateX(-50%);
  width: min(360px, calc(100vw - 32px));
  padding: 16px;
  background: rgba(0, 0, 0, 0.26);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 22px;
  text-align: center;
  z-index: 110;
  transition: opacity 0.4s ease;
  backdrop-filter: blur(6px);
}

.instruction-card.hidden {
  opacity: 0;
  pointer-events: none;
}

.reticle {
  width: 112px;
  height: 112px;
  margin: 14px auto 0;
  border: 1px solid rgba(217, 249, 157, 0.35);
  border-radius: 28px;
  position: relative;
  opacity: 0.38;
}

.reticle::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  background: rgba(217, 249, 157, 0.7);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.instruction-kicker {
  margin: 0 0 8px;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(245, 245, 242, 0.52);
}

.instruction-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 500;
}

.instruction-copy {
  margin: 8px 0 0;
  font-size: 0.84rem;
  line-height: 1.55;
  color: rgba(245, 245, 242, 0.62);
}

@keyframes glowFloat {
  0%,
  100% {
    transform: translateX(-50%) scale(0.94);
    opacity: 0.42;
  }
  50% {
    transform: translateX(-50%) scale(1.06);
    opacity: 0.68;
  }
}

@keyframes glowPulse {
  0%,
  100% {
    transform: translateX(-50%) scale(0.92);
    opacity: 0.28;
  }
  50% {
    transform: translateX(-50%) scale(1.08);
    opacity: 0.5;
  }
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 4rem;
  }

  .instruction-card {
    bottom: calc(env(safe-area-inset-bottom, 0px) + 22px);
  }

  .status-panel {
    width: 90%;
  }
}
