/* In-place guide unlock. Loaded after style.css so it can show #unlock as a lock card. */

.js-show-when-unlocked { display: none !important; }

html.guide-is-unlocked .js-hide-when-unlocked,
html.guide-is-unlocked .unlock-cta,
html.guide-is-unlocked .js-unlock,
html.guide-is-unlocked .js-open-locker,
html.guide-is-unlocked .guide-lock-stage > #unlock,
html.guide-is-unlocked #locker-box,
html.guide-is-unlocked .guide-teaser-fade {
  display: none !important;
}

html.guide-is-unlocked .js-show-when-unlocked {
  display: inline-flex !important;
}

html.guide-is-unlocked .hero-actions .js-show-when-unlocked.btn-ghost {
  /* keep ghost button styling; inline-flex matches .btn */
}

#questions { scroll-margin-top: var(--header-offset); }
#guide-full,
#how-to-use,
#dice-regen,
#free-dice,
#multiplier,
#partners,
#tournaments,
#flash-events,
#stickers,
#vaults,
#building,
#daily-routine,
#mistakes,
#faq,
#sources {
  scroll-margin-top: var(--header-offset);
}

html.guide-is-unlocked #questions {
  display: none;
}

.guide-lock-stage {
  position: relative;
  margin-top: 1.1rem;
  min-height: 30rem;
}

.guide-lock-stage > #unlock {
  display: block;
  position: absolute;
  z-index: 4;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: calc(100% - 1.6rem);
  max-width: 26.5rem;
  margin: 0;
  scroll-margin-top: var(--header-offset);
}

.guide-lock-stage #locker-box {
  text-align: center;
  padding: 1.35rem 1.15rem 1.2rem;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 210, 74, 0.18);
  background: rgba(18, 10, 36, 0.96);
}

.guide-lock-stage #locker-box .btn {
  min-width: min(100%, 20rem);
  margin-top: 0.35rem;
}

.guide-lock-stage #locker-box p {
  margin: 0.45rem 0 0;
}

.guide-lock-stage #locker-box .locker-label {
  margin: 0 0 0.2rem;
}

.guide-full-clip {
  position: relative;
  max-height: 32rem;
  overflow: hidden;
  border-radius: var(--radius);
}

html:not(.guide-is-unlocked) .guide-full-clip .fg-layout {
  filter: blur(6px);
  opacity: 0.5;
  transform: scale(1.015);
  transform-origin: top center;
  user-select: none;
  pointer-events: none;
}

.guide-teaser-fade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 9rem;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(11, 6, 24, 0) 0%, rgba(11, 6, 24, 0.72) 48%, var(--bg) 100%);
  border-radius: 0 0 var(--radius) var(--radius);
}

html.guide-is-unlocked .guide-full-clip {
  max-height: none;
  overflow: visible;
}

html.guide-is-unlocked .guide-full-clip .fg-layout {
  filter: none;
  opacity: 1;
  transform: none;
  user-select: auto;
  pointer-events: auto;
}

html.guide-is-unlocked .guide-lock-stage {
  min-height: 0;
}

.guide-unlocked-actions {
  display: none;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 1rem;
  scroll-margin-top: var(--header-offset);
}
.guide-unlocked-actions .btn {
  width: auto;
  min-width: 0;
  flex: 0 1 auto;
}

html.guide-is-unlocked .guide-unlocked-actions {
  display: flex;
}

html.guide-is-unlocked .guide-lock-stage .fg-layout {
  padding-top: 0.4rem;
}

@media print {
  .guide-lock-stage > #unlock,
  .guide-teaser-fade,
  .unlock-cta,
  .js-hide-when-unlocked,
  .js-unlock {
    display: none !important;
  }
  html:not(.guide-is-unlocked) .guide-full-clip {
    max-height: none;
    overflow: visible;
  }
  html:not(.guide-is-unlocked) .guide-full-clip .fg-layout {
    filter: none;
    opacity: 1;
    transform: none;
  }
}
