/* concepts/baby-zen/app/css/sheet.css
   ---------------------------------------------------------------------------
   The chassis shared by both bottom sheets: scrim, spring, handle, close
   button, scroll behaviour. Per-sheet looks live in sheet-music.css and
   sheet-settings.css, which override the `--music` / `--settings` variants.
   --------------------------------------------------------------------------- */

.bz-sheet-scrim {
  position: absolute;
  inset: 0;
  background: var(--scrim);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-sheet) var(--ease);
}
.bz-sheet-scrim.is-open { opacity: 1; pointer-events: auto; }
/* Sound.png keeps the moon clearly readable above the Music sheet — measured,
   it loses about a quarter of its brightness, not two thirds. The default
   scrim is tuned for Settings, which sits over a nursery the mockup does show
   dark, so only Music lightens it. */
.bz-sheets[data-open='music'] .bz-sheet-scrim {
  background: rgba(2, 4, 18, 0.22);
  /* And no blur: in Sound.png the baby's face above the sheet is still sharp.
     The scrim's 2 px is imperceptible on its own and unmistakable here, where
     it is the only thing between the viewer and the artwork. */
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
/* Belt and braces: pointer-events on a child wins over `none` on the parent
   layer, so a scrim left behind by a bug would still swallow taps. It cannot
   if no sheet is open. */
.bz-sheets:not([data-open]) .bz-sheet-scrim { pointer-events: none; }

.bz-sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  max-height: calc(100% - 24px);
  border-radius: var(--r-sheet) var(--r-sheet) 0 0;
  background: linear-gradient(180deg, var(--sheet-bg-top) 0%, var(--sheet-bg) 12%, var(--sheet-bg) 100%);
  border-top: 1px solid var(--sheet-stroke);
  box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(26px) saturate(1.15);
  -webkit-backdrop-filter: blur(26px) saturate(1.15);
  transform: translate3d(0, 100%, 0);
  transition: transform var(--dur-sheet) var(--ease);
  will-change: transform;
}
.bz-sheet.is-open { transform: translate3d(0, 0, 0); }
.bz-sheet[hidden] { display: none; }

/* The Settings fasit shows a card floating clear of the screen edges rather
   than a sheet welded to the bottom. */
.bz-sheet--lifted {
  left: 10px;
  right: 10px;
  bottom: 14px;
  border-radius: var(--r-sheet);
  border: 1px solid var(--sheet-stroke);
  max-height: calc(100% - 100px);
}

.bz-sheet-body {
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 0 22px calc(20px + var(--safe-bottom));
}
.bz-sheet--lifted .bz-sheet-body { padding: 0 20px 20px; }

.bz-sheet-handle {
  flex: none;
  width: 36px;
  height: 4px;
  margin: 9px auto 0;
  border-radius: 999px;
  background: rgba(176, 188, 255, 0.32);
}

.bz-sheet-close {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: var(--ink-dim);
  background: rgba(126, 140, 224, 0.13);
  border: 1px solid var(--stroke);
  transition: background var(--dur-ui) var(--ease), color var(--dur-ui) var(--ease);
}
.bz-sheet-close:hover { background: rgba(126, 140, 224, 0.2); color: var(--ink); }

/* ── Pieces both sheets use ─────────────────────────────────────────────── */

.bz-sheet-title {
  font-family: var(--font-serif);
  font-weight: 400;
  letter-spacing: 0.005em;
  background: var(--gradient-ink);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.bz-cta {
  display: grid;
  place-items: center;
  width: 100%;
  height: 56px;
  border-radius: var(--r-pill);
  background: var(--gradient-cta);
  color: #ffffff;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow: 0 6px 26px rgba(79, 140, 250, 0.35), 0 0 34px rgba(139, 92, 246, 0.22);
  transition: transform 140ms var(--ease), filter var(--dur-ui) var(--ease);
}
.bz-cta:active { transform: scale(0.985); filter: brightness(1.06); }

/* Sampled in clean areas of Sound.png the sheet is rgb(8,14,40) and flat from
   y 400 all the way to y 780 — no bottom-lit gradient, which ours had from CTA
   glow spill, and a third darker than we were painting it. */
.bz-sheet--music {
  background: linear-gradient(180deg, #0d1030 0%, #0a0e2a 4%, #080e28 12%, #080e28 100%);
}
