:root {
  --chrome: #e8e8e8;
  --cool-blue: #a9c9e2;
  --warm-amber: #d4a76a;
  --warm-orange: #ff8c42;
  --bg-dark: #12121a;
  --bg-panel: #1e1e2a;
  --card: #252535;
  --text: #f2f2f5;
  --muted: #9494a8;
  --success: #5ecf8a;
  --danger: #e85d5d;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: #ffffff;
  color: #1a1a1a;
  min-height: 100vh;
  min-height: 100dvh;
  min-height: -webkit-fill-available;
  display: flex;
  justify-content: center;
}

#app {
  width: 100%;
  max-width: 420px;
  min-height: 100vh;
  min-height: 100dvh;
  min-height: -webkit-fill-available;
  position: relative;
  overflow: hidden;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.screen {
  display: none;
  min-height: 100vh;
  min-height: 100dvh;
  min-height: -webkit-fill-available;
  flex-direction: column;
  animation: fadeIn 0.35s ease;
}

.screen.active { display: flex; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== INTRO ===== */
.intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  overflow: hidden;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  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);
}

.intro-overlay.hidden { display: none; }

.intro-video {
  position: absolute;
  inset: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
  z-index: 0;
}

.intro-logo-wrap {
  position: relative;
  z-index: 10;
  padding: 2rem;
  pointer-events: none;
}

.intro-logo {
  width: min(360px, 88vw);
  max-height: 40vh;
  height: auto;
  display: block;
  background: transparent;
  filter: drop-shadow(0 8px 24px rgba(0,0,0,0.14));
  transition: filter 1s ease, transform 1s ease;
}

.intro-logo.intro-animate {
  animation: logo-glow 10s ease-in-out forwards;
}

@keyframes logo-glow {
  0% { filter: brightness(0.9) drop-shadow(0 4px 12px rgba(0,0,0,0.15)); transform: scale(0.96); }
  20% {
    filter: brightness(1.12)
      drop-shadow(0 0 28px rgba(169,201,226,0.55))
      drop-shadow(0 8px 20px rgba(212,167,106,0.35));
    transform: scale(1);
  }
  50% {
    filter: brightness(1.2)
      drop-shadow(0 0 36px rgba(255,255,255,0.45))
      drop-shadow(-4px 0 18px rgba(169,201,226,0.45))
      drop-shadow(4px 4px 18px rgba(212,167,106,0.35));
  }
  100% { filter: brightness(1.05) drop-shadow(0 8px 24px rgba(0,0,0,0.12)); transform: scale(1); }
}

.intro-shimmer,
.intro-lighting {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    105deg,
    transparent 20%,
    rgba(255,255,255,0.55) 42%,
    rgba(169,201,226,0.35) 50%,
    rgba(255,200,120,0.25) 55%,
    transparent 78%
  );
  background-size: 250% 100%;
  animation: shimmer 2.8s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 100% { background-position: 200% 0; opacity: 0.6; }
  50% { background-position: -200% 0; opacity: 1; }
}

.intro-sparkle {
  position: absolute;
  z-index: 2;
  width: 14px;
  height: 14px;
  background: radial-gradient(circle, #fff 0%, rgba(169,201,226,0.6) 40%, transparent 70%);
  border-radius: 50%;
  animation: sparkle 2s ease-in-out infinite;
  pointer-events: none;
}

.intro-sparkle:nth-child(1) { top: 18%; left: 12%; }
.intro-sparkle:nth-child(2) { top: 28%; right: 18%; animation-delay: 0.6s; width: 10px; height: 10px; }
.intro-sparkle:nth-child(3) { bottom: 32%; left: 22%; animation-delay: 1.1s; }
.intro-sparkle:nth-child(4) { bottom: 22%; right: 28%; animation-delay: 1.7s; width: 18px; height: 18px; }

@keyframes sparkle {
  0%, 100% { opacity: 0.15; transform: scale(0.7); }
  50% { opacity: 1; transform: scale(1.3); }
}

.intro-hint {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: #777;
  pointer-events: none;
  animation: intro-hint-pulse 2.4s ease-in-out infinite;
}

@keyframes intro-hint-pulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

.brand-logo {
  display: block;
  margin: 0 auto;
  width: 100px;
  background: transparent;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.1));
  transition: filter 0.3s;
}

.brand-logo.on-white,
.brand-logo.on-black {
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.1));
  opacity: 1;
}

.screen-header {
  background: #ffffff;
}
