/* Persistent playback and real network-loading feedback. */
.lull-dock {
  position: fixed; inset-inline: 24px; bottom: max(20px, env(safe-area-inset-bottom, 0px));
  z-index: 190; max-width: 1120px; margin-inline: auto; padding: 18px 20px;
  display: grid; grid-template-columns: 60px minmax(140px, 1fr) auto minmax(170px, 1fr) 90px 44px;
  align-items: center; gap: 18px; color: #292340; background: #fffdf9;
  border: 1px solid #d9cce8; border-radius: 24px;
  box-shadow: 0 12px 48px rgb(41 35 64 / 22%); isolation: isolate;
}
.lull-dock[hidden] { display: none; }
.lull-dock__art { position: relative; width: 60px; height: 60px; border-radius: 18px; background: #f0e9fc; color: #5c3e99; display: grid; place-items: center; overflow: hidden; }
.lull-dock__art > span { font-size: 36px; line-height: 1; transform: rotate(-20deg); }
.lull-dock__art::after { content: ''; position: absolute; inset: 6px; border: 2px solid transparent; border-top-color: #7454b8; border-right-color: #7454b8; border-radius: 50%; opacity: 0; }
.lull-dock__info { min-width: 0; }
.lull-dock .lull-dock__status { color: #62566f; font-size: 12px; margin: 0 0 4px; line-height: 1.8; }
.lull-dock h2 { color: #292340; font: 750 15px/1.8 'Vazirmatn', sans-serif; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: start; }
.lull-dock__controls { display: flex; gap: 6px; align-items: center; }
.lull-dock .lull-dock__button { display: grid; place-items: center; padding: 0; width: 44px; height: 44px; flex-shrink: 0; border: 0; border-radius: 50%; color: #5c3e99; background: #f0e9fc; cursor: pointer; }
.lull-dock__button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.lull-dock .lull-dock__toggle { width: 52px; height: 52px; color: #fff; background: #5c3e99; }
.lull-dock .lull-dock__close { background: transparent; color: #62566f; }
.lull-dock__button:hover { filter: brightness(.94); }
.lull-dock :is(button, input):focus-visible { outline: 3px solid #94600b; outline-offset: 3px; }
.lull-dock .dock-pause-icon { display: none; }
.lull-dock:is([data-state=playing], [data-state=loading]) .dock-pause-icon { display: block; }
.lull-dock:is([data-state=playing], [data-state=loading]) .dock-play-icon { display: none; }
.lull-dock__progress { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #62566f; font-variant-numeric: tabular-nums; }
.lull-dock__progress span { min-width: 34px; white-space: nowrap; }
.lull-dock input[type=range] { padding: 0; border: 0; height: 28px; width: 100%; min-width: 0; accent-color: #7454b8; cursor: pointer; background: transparent; box-shadow: none; }
.lull-dock__progress input { flex: 1; }
.lull-dock__volume { display: flex; align-items: center; gap: 6px; color: #62566f; font-size: 12px; }
.lull-dock__volume input { flex: 1; }
.lull-dock[data-state=loading] .lull-dock__art::after { opacity: 1; animation: lull-load-spin 1.1s linear infinite; }
.lull-dock[data-state=loading] .lull-dock__art > span { opacity: .4; }
.lull-dock[data-state=loading]::after { content: ''; position: absolute; inset: auto 24px 0; height: 3px; border-radius: 3px; background: #a58acb; background-size: 200% 100%; animation: lull-load-shimmer 1.6s linear infinite; }
.lull-dock[data-state=error] .lull-dock__status { color: #a42545; }
.lull-soundwave { display: none; position: absolute; inset: auto 12px 9px; height: 16px; align-items: center; justify-content: center; gap: 3px; }
.lull-soundwave i { display: block; width: 3px; height: 10px; border-radius: 4px; background: #7454b8; animation: lull-wave .9s ease-in-out infinite alternate; }
.lull-soundwave i:nth-child(2) { animation-delay: -.5s; }
.lull-soundwave i:nth-child(3) { animation-delay: -.2s; }
.lull-soundwave i:nth-child(4) { animation-delay: -.7s; }
.lull-dock[data-state=playing] .lull-soundwave { display: flex; }
.lull-dock[data-state=playing] .lull-dock__art > span { transform: translateY(-5px) rotate(-20deg); font-size: 30px; }
body.lull-dock-visible { padding-bottom: 130px; }
body.lull-dock-visible .toast { bottom: 135px; }
body.lull-dock-visible :is(.back-to-top, .accessibility-toggle) { bottom: 140px; }
.lull-card.is-loading .play-btn { position: relative; }
.lull-card.is-loading .play-btn::after { content: ''; position: absolute; inset: 4px; border: 2px solid transparent; border-top-color: currentColor; border-right-color: currentColor; border-radius: 50%; animation: lull-load-spin 1.1s linear infinite; }
.lullaby-loading-mark { display: inline-block; vertical-align: middle; width: 16px; height: 16px; margin-inline-end: 6px; border: 2px solid #ded2ef; border-top-color: #7454b8; border-radius: 50%; visibility: hidden; }
.lullaby-player.is-loading .lullaby-loading-mark { visibility: visible; animation: lull-load-spin 1.1s linear infinite; }
.lullaby-player.is-loading .lullaby-player__inner { position: relative; }
.lullaby-player.is-loading .lullaby-player__inner::after { content: ''; position: absolute; inset: auto 0 -10px; height: 3px; border-radius: 3px; background: #a58acb; background-size: 200% 100%; animation: lull-load-shimmer 1.6s linear infinite; }
@keyframes lull-load-spin { to { transform: rotate(360deg); } }
@keyframes lull-load-shimmer { to { background-position: -200% 0; } }
@keyframes lull-wave { to { transform: scaleY(.35); } }
@media (max-width: 1000px) {
  .lull-dock { grid-template-columns: 52px minmax(0, 1fr) auto 44px; gap: 12px; }
  .lull-dock__art { width: 52px; height: 52px; }
  .lull-dock__progress { grid-row: 2; grid-column: 1 / -1; }
  .lull-dock__volume { display: none; }
  body.lull-dock-visible { padding-bottom: 176px; }
  body.lull-dock-visible .toast { bottom: 180px; }
}
@media (max-width: 600px) {
  .lull-dock { inset-inline: 10px; bottom: max(10px, env(safe-area-inset-bottom, 0px)); padding: 14px; border-radius: 20px; grid-template-columns: 44px minmax(0, 1fr) 44px; gap: 8px 10px; }
  .lull-dock__art { width: 44px; height: 44px; border-radius: 13px; }
  .lull-dock__art > span { font-size: 30px; }
  .lull-dock__controls { grid-row: 2; grid-column: 1 / -1; justify-content: center; gap: 12px; }
  .lull-dock__close { grid-row: 1; grid-column: 3; }
  .lull-dock__progress { grid-row: 3; }
  .lull-dock h2 { font-size: 14px; }
  body.lull-dock-visible { padding-bottom: 218px; }
  body.lull-dock-visible .toast { bottom: 215px; }
  body.lull-dock-visible :is(.back-to-top, .accessibility-toggle) { bottom: 222px; }
}
@media (prefers-reduced-motion: reduce) {
  .lull-dock *, .lull-dock::after, .lull-dock__art::after, .lull-card.is-loading .play-btn::after,
  .lullaby-loading-mark, .lullaby-player.is-loading .lullaby-player__inner::after { animation: none !important; }
}
