/* Experience footers — fixed bottom bar, scroll-safe, neon lab */

.exp-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  pointer-events: none;
  padding: 0.45rem clamp(0.75rem, 3vw, 1.25rem);
  padding-bottom: max(0.45rem, env(safe-area-inset-bottom));
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.72rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.72);
  background: linear-gradient(
    0deg,
    rgba(8, 6, 14, 0.92) 0%,
    rgba(8, 6, 14, 0.78) 70%,
    transparent 100%
  );
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.exp-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem 0.65rem;
  max-width: 64rem;
  margin: 0 auto;
}

.exp-footer__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  pointer-events: none;
}

.exp-footer__slot {
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.62rem;
  background: linear-gradient(125deg, #00f5ff 0%, #9d4dff 45%, #ff2d95 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.exp-footer__player {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.88);
}

.exp-footer__nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.15rem 0.55rem;
}

.exp-footer a {
  pointer-events: auto;
  color: #00f5ff;
  font-weight: 600;
  text-decoration: none;
  padding: 0.25rem 0.15rem;
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
}

.exp-footer a:hover {
  text-decoration: underline;
}

.exp-footer a:focus-visible {
  outline: 2px solid #00f5ff;
  outline-offset: 2px;
  border-radius: 2px;
}

.exp-footer__sep {
  opacity: 0.35;
  pointer-events: none;
}

.exp-footer__cross {
  margin: 0;
  width: 100%;
  text-align: center;
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.55);
}

.exp-footer__credit {
  margin: 0;
  width: 100%;
  text-align: center;
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.45);
}

.exp-footer__credit a {
  color: rgba(184, 255, 60, 0.85);
  min-height: auto;
  padding: 0;
}

/* Scrub-engine: lift scroll hint above footer */
body:has(.exp-footer) .sw-hint {
  bottom: calc(3.25rem + env(safe-area-inset-bottom));
}

/* Week-2: keep copy panels clear of footer */
body:has(.exp-footer) .scroll-section {
  padding-bottom: calc(4rem + env(safe-area-inset-bottom));
}

/* Week-2 keyboard help */
.controls-help__trigger {
  position: fixed;
  right: max(0.75rem, env(safe-area-inset-right));
  bottom: calc(3.5rem + env(safe-area-inset-bottom));
  z-index: 101;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(10, 6, 18, 0.82);
  color: rgba(255, 255, 255, 0.75);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.controls-help__trigger:hover {
  color: #e056fd;
  border-color: rgba(224, 86, 253, 0.45);
}

.controls-help__trigger:focus-visible {
  outline: 3px solid #e056fd;
  outline-offset: 2px;
}

.controls-help {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(6, 4, 10, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.controls-help[hidden] {
  display: none;
}

.controls-help__panel {
  max-width: 22rem;
  padding: 1.25rem 1.35rem;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(14, 10, 22, 0.95);
  color: #f8f0ff;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.controls-help__title {
  margin: 0 0 0.75rem;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.1rem;
}

.controls-help__list {
  margin: 0 0 1rem;
  padding-left: 1.1rem;
  font-size: 0.88rem;
  color: #c4b8d8;
}

.controls-help__list kbd {
  display: inline-block;
  padding: 0.1rem 0.35rem;
  border-radius: 0.25rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  font-family: inherit;
  font-size: 0.82rem;
  color: #f8f0ff;
}

.controls-help__close {
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.5rem 0.85rem;
  border: 1px solid rgba(224, 86, 253, 0.35);
  border-radius: 0.5rem;
  background: transparent;
  color: #e056fd;
  cursor: pointer;
}

.controls-help__close:focus-visible {
  outline: 3px solid #e056fd;
  outline-offset: 2px;
}

@media (min-width: 640px) {
  .exp-footer__cross,
  .exp-footer__credit {
    width: auto;
  }

  .exp-footer__inner {
    flex-wrap: nowrap;
  }

  .exp-footer__cross {
    margin-left: auto;
  }

  .exp-footer__credit {
    margin-left: 0.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .exp-footer {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}
