/* Splash screen */
.splash-screen {
  position: relative;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding: calc(var(--space-6) + var(--safe-top)) var(--space-6) calc(var(--space-6) + var(--safe-bottom));
  background: linear-gradient(160deg, var(--color-lemon-light) 0%, var(--color-lemon) 45%, var(--color-coral) 135%);
  transition: opacity 260ms ease, transform 260ms ease;
}

.splash-screen--exit {
  opacity: 0;
  transform: scale(0.98);
}

.splash-hero-image {
  display: none;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.splash-screen--has-image .splash-hero-image {
  display: block;
}

.splash-screen--has-image .splash-screen__hero-fallback,
.splash-screen--has-image .splash-screen__logo,
.splash-screen--has-image .splash-screen__decor,
.splash-screen--has-image .splash-screen__title {
  display: none;
}

/* The artwork carries its own logo lockup in the upper portion, so push the
   remaining text (subtitle/tagline/CTA) down into the open ground area at
   the bottom instead of dead-centering it over the art. */
.splash-screen--has-image {
  justify-content: flex-end;
  padding-bottom: calc(var(--space-8) + var(--safe-bottom));
}

.splash-screen--has-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(20, 14, 4, 0) 0%,
    rgba(20, 14, 4, 0) 52%,
    rgba(20, 14, 4, 0.5) 76%,
    rgba(20, 14, 4, 0.78) 100%
  );
  z-index: 1;
}

.splash-screen__decor,
.splash-screen__content,
.splash-screen__cta {
  position: relative;
  z-index: 2;
}

.splash-screen__hero-fallback {
  position: relative;
  width: 100%;
  max-width: 240px;
  height: 120px;
  margin: 0 auto var(--space-4);
}

.splash-sun {
  position: absolute;
  top: -6px;
  right: 14px;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff7d6, var(--color-lemon-light));
  box-shadow: 0 0 44px 12px rgba(255, 224, 92, 0.55);
}

.splash-stand {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  font-size: 3.4rem;
}

.splash-screen__logo {
  font-size: 3.75rem;
  margin-bottom: var(--space-2);
}

.splash-screen__title {
  font-size: var(--font-size-3xl);
  font-weight: 800;
  color: var(--color-navy);
}

.splash-screen__subtitle {
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: var(--color-charcoal);
  margin-bottom: var(--space-4);
}

.splash-screen__tagline {
  font-size: var(--font-size-sm);
  color: var(--color-charcoal);
  opacity: 0.85;
  max-width: 320px;
  margin: 0 auto var(--space-7);
  line-height: 1.55;
}

.splash-screen--has-image .splash-screen__title,
.splash-screen--has-image .splash-screen__subtitle,
.splash-screen--has-image .splash-screen__tagline {
  color: #fff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
}

.splash-screen__cta {
  min-width: 260px;
}

.splash-screen__cta:disabled {
  opacity: 0.7;
}

.splash-slice {
  position: absolute;
  font-size: 2rem;
  opacity: 0.55;
  animation: splash-float 6s ease-in-out infinite;
}

.splash-slice.s1 { top: 12%; left: 8%; animation-delay: 0s; }
.splash-slice.s2 { top: 20%; right: 10%; font-size: 1.5rem; animation-delay: 1.2s; }
.splash-slice.s3 { bottom: 20%; left: 14%; font-size: 1.75rem; animation-delay: 2.4s; }

.splash-bubble {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  animation: splash-float 8s ease-in-out infinite;
}

.splash-bubble.b1 { width: 24px; height: 24px; top: 30%; left: 22%; animation-delay: 0.5s; }
.splash-bubble.b2 { width: 14px; height: 14px; top: 58%; right: 18%; animation-delay: 1.8s; }
.splash-bubble.b3 { width: 18px; height: 18px; bottom: 14%; right: 28%; animation-delay: 3s; }

@keyframes splash-float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-16px) rotate(8deg); }
}

@media (prefers-reduced-motion: reduce) {
  .splash-slice, .splash-bubble { animation: none; }
}

/* New game screen */
.onboarding {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: calc(var(--space-6) + var(--safe-top)) var(--space-5) calc(var(--space-6) + var(--safe-bottom));
  background: linear-gradient(180deg, var(--color-lemon-light) 0%, var(--color-cream) 55%);
}

.onboarding__brand {
  text-align: center;
  margin-bottom: var(--space-6);
}

.onboarding__logo {
  font-size: 3.5rem;
  margin-bottom: var(--space-2);
}

.onboarding__title {
  font-size: var(--font-size-3xl);
  font-weight: 800;
  color: var(--color-navy);
}

.onboarding__subtitle {
  color: var(--color-charcoal);
  opacity: 0.8;
}

.difficulty-card {
  border: 2px solid transparent;
}

.difficulty-card[aria-pressed='true'] {
  border-color: var(--accent-primary-strong);
  background: var(--bg-card-alt);
}

/* Stand / home screen */
.stand-hero {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  padding: var(--space-5);
  padding-bottom: calc(var(--space-5) + 60px);
  background: linear-gradient(160deg, var(--color-sky) 0%, var(--color-sky-dark) 100%);
  color: #fff;
  min-height: 160px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.stand-hero__weather {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  font-size: var(--font-size-2xl);
}

.stand-hero__scene {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 70px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  font-size: 2.6rem;
  gap: var(--space-3);
}

.stand-hero__title {
  font-size: var(--font-size-xl);
  font-weight: 800;
}

.readiness-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.readiness-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--font-size-sm);
}

.readiness-item .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border-strong);
  flex-shrink: 0;
}

.readiness-item.done .dot { background: var(--accent-success); }
.readiness-item.done { color: var(--text-secondary); text-decoration: line-through; }

.cta-button {
  margin-top: var(--space-1);
}

/* Live day screen */
.live-scene {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 220px;
  background: linear-gradient(180deg, var(--color-sky) 0%, var(--color-sky-dark) 65%, var(--color-leaf) 65%, var(--color-leaf-dark) 100%);
  display: flex;
  align-items: flex-end;
  padding: var(--space-3);
}

.live-scene__stand {
  position: absolute;
  bottom: var(--space-3);
  left: 50%;
  transform: translateX(-50%);
  font-size: 3.4rem;
  filter: drop-shadow(0 6px 6px rgba(0,0,0,0.2));
}

.live-scene__customers {
  position: absolute;
  bottom: 20px;
  left: 0;
  right: 0;
  height: 60px;
  overflow: hidden;
}

.customer-avatar {
  position: absolute;
  bottom: 0;
  font-size: 1.8rem;
  transition: left 400ms linear;
}

.live-scene__clock {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  background: rgba(255,255,255,0.9);
  color: var(--color-navy);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: var(--font-size-sm);
}

.live-scene__cash-float {
  position: absolute;
  top: 40%;
  left: 50%;
}

.speed-controls {
  display: flex;
  gap: var(--space-2);
  justify-content: center;
}

.speed-controls .chip { min-width: 52px; text-align: center; justify-content: center; }

.live-feed {
  max-height: 160px;
  overflow-y: auto;
  display: flex;
  flex-direction: column-reverse;
  gap: var(--space-1);
}

.live-feed__item {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  padding: var(--space-1) 0;
}

.live-stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-2);
}

/* Results screen */
.results-hero {
  text-align: center;
  padding: var(--space-6) var(--space-4);
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, var(--color-lemon-light), var(--color-lemon));
  color: var(--color-navy);
}

.results-hero__amount {
  font-size: var(--font-size-3xl);
  font-weight: 800;
}

.factor-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.factor-item {
  display: flex;
  gap: var(--space-2);
  font-size: var(--font-size-sm);
  align-items: flex-start;
}

.factor-item .mark {
  font-weight: 800;
  flex-shrink: 0;
  width: 18px;
}

.factor-item.good .mark { color: var(--color-leaf-dark); }
.factor-item.bad .mark { color: var(--accent-danger); }

/* Recipe screen */
.recipe-glass {
  width: 100%;
  max-width: 160px;
  margin: 0 auto var(--space-4);
  aspect-ratio: 3/4;
  border: 4px solid var(--color-navy);
  border-radius: 0 0 28px 28px / 0 0 40px 40px;
  position: relative;
  overflow: hidden;
  background: rgba(255,255,255,0.3);
}

.recipe-glass__fill {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--color-lemon);
  transition: height var(--transition-base), background var(--transition-base);
}

/* Supplies screen */
.freshness-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.freshness-fresh { background: var(--accent-success); }
.freshness-aging { background: var(--accent-warning); }
.freshness-use-soon { background: var(--accent-secondary); }
.freshness-spoiled { background: var(--accent-danger); }
.freshness-none { background: var(--border-strong); }

/* Reports */
.trend-bars {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 100px;
}

.trend-bar {
  flex: 1;
  background: linear-gradient(180deg, var(--color-lemon), var(--color-coral));
  border-radius: 4px 4px 0 0;
  min-height: 4px;
}

/* Achievements */
.achievement-card {
  opacity: 0.45;
  filter: grayscale(0.6);
}

.achievement-card.earned {
  opacity: 1;
  filter: none;
}

/* Tutorial overlay */
.tutorial-callout {
  position: fixed;
  z-index: 150;
  max-width: 280px;
  background: var(--color-navy);
  color: var(--text-inverse);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  box-shadow: var(--shadow-elevated);
}

.tutorial-callout::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 24px;
  border-width: 8px 8px 0 8px;
  border-style: solid;
  border-color: var(--color-navy) transparent transparent transparent;
}
