/* Fruit Slash start screen: resume, theme tiles, the two level buttons. */
.fs-start {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  display: grid;
  place-items: center;
  padding: 0;
}

.fs-parade {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  font-size: 1.6rem;
}

.fs-parade span {
  display: inline-block;
  animation: fs-bounce 1.6s ease-in-out infinite;
}

.fs-parade span:nth-child(2) {
  animation-delay: 0.15s;
}

.fs-parade span:nth-child(3) {
  animation-delay: 0.3s;
}

.fs-parade span:nth-child(4) {
  animation-delay: 0.45s;
}

.fs-parade span:nth-child(5) {
  animation-delay: 0.6s;
}

@keyframes fs-bounce {
  50% {
    transform: translateY(-0.5rem) rotate(-8deg);
  }
}

.fs-logo {
  margin: 0 0 0.4rem;
  font-size: clamp(1.9rem, 9vw, 3rem);
  font-weight: 900;
  line-height: 1.05;
  background: linear-gradient(
    90deg,
    #ff4d6d,
    #ffd23f,
    #4cd964,
    #4cc9f0,
    #d264ff
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 10px rgba(255, 210, 63, 0.45));
}

/* A saved match takes the pitch's room on the dashboard. */
.fs-card:has(.fs-resume:not([hidden])) .fs-pitch,
.fs-card:has(.fs-resume:not([hidden])) .fs-parade {
  display: none;
}

.fs-pitch {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffe9ff;
}

.fs-step {
  margin-top: 0.9rem !important;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #c9b6ff;
}

.fs-resume {
  width: 100%;
  background: linear-gradient(135deg, #4cc9f0, #4361ee);
  box-shadow:
    0 4px 0 #23308f,
    0 0 20px rgba(76, 201, 240, 0.5);
}

.fs-resume-info {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  opacity: 0.9;
}

.fs-themes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}

.fs-theme {
  min-width: 0;
  min-height: 3.9rem;
  padding: 0.3rem 0.25rem;
  border: 3px solid rgba(255, 255, 255, 0.14);
  border-radius: 1.1rem;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.85rem;
  cursor: pointer;
  transition:
    transform 0.12s,
    border-color 0.12s,
    box-shadow 0.12s;
}

.fs-theme.active {
  border-color: #fff275;
  background: rgba(255, 242, 117, 0.16);
  box-shadow: 0 0 18px rgba(255, 242, 117, 0.55);
  transform: scale(1.04);
}

.fs-theme-icon {
  display: block;
  font-size: 1.6rem;
  line-height: 1.15;
}

.fs-modes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

.fs-modes .fs-mode {
  min-width: 0;
  min-height: 5.4rem;
  margin: 0;
  padding: 0.6rem 0.4rem;
}

.fs-mode-kids {
  background: linear-gradient(135deg, #4cd964, #13b6a8);
  box-shadow:
    0 4px 0 #0b6b5f,
    0 0 20px rgba(76, 217, 100, 0.5);
}

.fs-mode-icon {
  display: block;
  font-size: 1.8rem;
  line-height: 1.1;
}

.fs-mode-hint {
  display: block;
  margin-top: 0.1rem;
  font-size: 0.72rem;
  font-weight: 700;
  opacity: 0.92;
}

@media (prefers-reduced-motion: reduce) {
  .fs-parade span {
    animation: none;
  }
}

@media (min-width: 700px) {
  .fs-themes {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

/* Phones on their side: the header already shows the title, so drop the
   parade, logo and pitch. Best, Resume and theme left; level right. */
@media (orientation: landscape) and (max-height: 500px) {
  .fs-parade,
  .fs-logo,
  .fs-pitch {
    display: none;
  }

  .fs-start .fs-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.7fr);
    grid-auto-flow: dense;
    align-items: center;
    column-gap: 1rem;
    width: min(100%, 40rem);
    padding: 0.5rem 0.9rem 0.7rem;
  }

  .fs-start .fs-card > * {
    grid-column: 1;
  }

  .fs-start .fs-card > .fs-step-mode,
  .fs-start .fs-modes {
    grid-column: 2;
  }

  .fs-start .fs-card > .fs-step-mode {
    grid-row: 1;
  }

  .fs-start .fs-modes {
    grid-row: 2 / span 4;
    align-self: stretch;
  }

  .fs-start .fs-card > .fs-best {
    margin: 0 0 0.3rem !important;
  }

  .fs-resume {
    min-height: 2.75rem;
    margin-top: 0;
    padding: 0.3rem 1rem;
  }

  .fs-step {
    margin: 0.3rem 0 !important;
  }

  .fs-theme {
    min-height: 3.2rem;
  }

  .fs-theme-icon {
    font-size: 1.3rem;
  }

  .fs-modes {
    grid-template-columns: minmax(0, 1fr);
  }

  .fs-modes .fs-mode {
    min-height: 3.4rem;
    padding: 0.3rem;
  }

  .fs-mode-icon {
    font-size: 1.3rem;
  }

  .fs-mode-hint {
    display: none;
  }
}
