/* Flip + redimensionare (public/js/flipgrow.js) */
.fg-ghost { position: fixed; z-index: 2147483000; perspective: 900px; pointer-events: none; }
.fg-card { position: absolute; inset: 0; transform-style: preserve-3d; }
.fg-face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; overflow: hidden; }
.fg-back { transform: rotateY(180deg); box-shadow: 0 0 0 1px rgba(14, 18, 32, .08); }
.fg-clone { pointer-events: none; }
.fg-veil { position: fixed; inset: 0; z-index: 2147482999; background: rgba(15, 26, 20, .42); backdrop-filter: blur(2px); pointer-events: none; }
.fg-cover { position: fixed; inset: 0; z-index: 2147483000; pointer-events: none; }
.fg-dot { position: fixed; width: 7px; height: 7px; border-radius: 50%; z-index: 2147483001; pointer-events: none; }

dialog.fg-dialog { border: 0; padding: 0; background: transparent; max-width: none; max-height: none; width: 100%; height: 100%; margin: 0; inset: 0; display: grid; place-items: center; overflow: auto; }
dialog.fg-dialog:not([open]) { display: none; }
dialog.fg-dialog::backdrop { background: rgba(15, 26, 20, .42); backdrop-filter: blur(2px); }
dialog.fg-dialog.fg-measure, dialog.fg-dialog.fg-measure::backdrop { opacity: 0; }
.fg-box { background: var(--surface, #fff); border-radius: 18px; width: min(640px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow: auto; box-shadow: 0 40px 100px -30px rgba(14, 18, 32, .45); position: relative; overscroll-behavior: contain; }
dialog.fg-in .fg-box > * { animation: fg-rise .34s cubic-bezier(.2, .8, .2, 1) both; }
dialog.fg-in .fg-box > *:nth-child(2) { animation-delay: 40ms; } dialog.fg-in .fg-box > *:nth-child(3) { animation-delay: 80ms; } dialog.fg-in .fg-box > *:nth-child(n+4) { animation-delay: 120ms; }
@keyframes fg-rise { from { opacity: 0; transform: translateY(8px); } }
@media (max-width: 640px) {
  dialog.fg-dialog { place-items: end center; }
  .fg-box { width: 100vw; max-height: 92dvh; border-radius: 18px 18px 0 0; }
}
@media (prefers-reduced-motion: reduce) { dialog.fg-in .fg-box > * { animation: none; } }
