/* chest-float.css · the floating «Cofre de regalo» on every parent screen (js/chest-float.js; his words 2026-11-01:
   «the cofre should be floating everywhere… otherwise they will not see it»). A gold pill in the bottom-right corner
   (Papás' 🌐 English pill is bottom-left), above any dock, inside the safe area; the chest drawn in CSS like Papás'
   own (css/papas.css .pp-chest-box). Parents only: js refuses to mount it outside Papás. */
.dcf {
  --dcf-dock: 0px;
  position: fixed; z-index: 40; right: calc(14px + env(safe-area-inset-right, 0px));
  bottom: calc(var(--dcf-dock) + 16px + env(safe-area-inset-bottom, 0px));
  display: inline-flex; align-items: center; gap: 10px; min-height: 56px; padding: 6px 18px 6px 8px; margin: 0; border: 0; border-radius: 999px;
  background: linear-gradient(180deg, #5a1010 0%, #3d0707 100%); color: #f7f1e4;
  box-shadow: inset 0 0 0 2px #e8c878, inset 0 1px 0 rgba(255, 255, 255, .25), 0 14px 26px -12px rgba(28, 10, 4, .7), 0 4px 10px -4px rgba(28, 10, 4, .45);
  font: 800 15px/1.1 'Noto Sans', 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; letter-spacing: .005em; white-space: nowrap;
  cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  transition: opacity 200ms ease, transform 160ms cubic-bezier(.2, .8, .2, 1);
}
.dcf[hidden] { display: none; }
.dcf:active { transform: scale(.96); }
.dcf:focus-visible { outline: 3px solid #e8c878; outline-offset: 3px; }
/* the little chest (review 2026-11-01: the coin over the box read as a blob): a clear wooden box with two gold bands
   and a gold lock, a DralyDirham peeking out from under the lid */
.dcf-chest { position: relative; flex: none; width: 44px; height: 44px; border-radius: 50%; background: radial-gradient(70% 70% at 50% 35%, #fff6d8, #ecc977); box-shadow: inset 0 0 0 1.5px rgba(61, 7, 7, .28); }
.dcf-chest img { position: absolute; left: 50%; top: 6px; width: 16px; height: 16px; transform: translateX(-50%); filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .3)); }
.dcf-body {
  position: absolute; left: 9px; right: 9px; bottom: 9px; height: 13px; border-radius: 2px 2px 4px 4px;
  background: linear-gradient(90deg, transparent 18%, #f0cf7c 18% 27%, transparent 27% 73%, #f0cf7c 73% 82%, transparent 82%), linear-gradient(180deg, #9a5524, #643010);
  box-shadow: inset 0 0 0 1.5px #4a2208, inset 0 -3px 0 rgba(0, 0, 0, .18);
}
.dcf-lid {
  position: absolute; left: 8px; right: 8px; top: 14px; height: 9px; border-radius: 10px 10px 2px 2px; transform-origin: 12% 100%;
  background: linear-gradient(90deg, transparent 17%, #f0cf7c 17% 26%, transparent 26% 74%, #f0cf7c 74% 83%, transparent 83%), linear-gradient(180deg, #c27a36, #7a3d15);
  box-shadow: inset 0 0 0 1.5px #4a2208;
}
.dcf-lock { position: absolute; left: 50%; top: 19px; width: 7px; height: 8px; border-radius: 2px; transform: translateX(-50%); background: #f6dc8c; box-shadow: 0 0 0 1px #4a2208; }
.dcf-t { color: #f3dc9a; }
/* it arrives once with a little hop and the lid lifts (never with reduced motion) */
.dcf.is-new { animation: dcf-in 520ms cubic-bezier(.34, 1.42, .64, 1) both; }
.dcf.is-new .dcf-lid { animation: dcf-lid 900ms ease-in-out 560ms 1 both; }
@keyframes dcf-in { from { opacity: 0; transform: translateY(18px) scale(.86); } }
@keyframes dcf-lid { 0%, 100% { transform: none; } 40% { transform: rotate(-16deg) translateY(-1px); } 70% { transform: rotate(-4deg); } }
/* steps aside: over one of the view's main buttons (ducked), a Papás sheet open, the keyboard up */
.dcf.is-ducked { opacity: 0; pointer-events: none; }
.dcf.is-kb, html.pp-lock .dcf { display: none; }
/* room at the end of the parent view, so its last button can scroll above the float */
.dcf-room { height: 84px; }
/* a laptop with a margin beside the view (js: 96 px or more): a round chest in that margin, its word under it */
.dcf.is-side {
  right: calc(var(--dcf-side, 14px) + env(safe-area-inset-right, 0px)); flex-direction: column; gap: 6px; width: 84px; min-height: 0;
  padding: 10px 6px 10px; border-radius: 22px; font-size: 13px; white-space: normal; text-align: center; line-height: 1.15;
}
.dcf.is-side .dcf-chest { width: 52px; height: 52px; }
.dcf.is-side .dcf-chest img { top: 9px; }
.dcf.is-side .dcf-body { left: 12px; right: 12px; bottom: 11px; height: 15px; }
.dcf.is-side .dcf-lid { left: 11px; right: 11px; top: 18px; height: 10px; }
.dcf.is-side .dcf-lock { top: 24px; }
@media (hover: hover) and (pointer: fine) { .dcf:hover { filter: brightness(1.08); } }
/* a narrow phone: the chest and a shorter pill */
@media (max-width: 359px) { .dcf { padding-right: 14px; font-size: 14px; gap: 8px; } }
@media (prefers-reduced-motion: reduce) {
  .dcf { transition: none; }
  .dcf.is-new, .dcf.is-new .dcf-lid { animation: none; }
  .dcf:active { transform: none; }
}
