/* ============================================================================
   Flying DeeDee (flappybird.js; the mode id stays "flappy")
   ============================================================================ */
#screen-flappybird {
    flex-direction: column;
    padding: 0;
    background: #87CEEB;
    overflow: hidden;
    /* Width scales with height to preserve a 430:780 portrait ratio */
    width: calc(100dvh * 430 / 780);
    max-width: 100vw;
    left: 50%;
    transform: translateX(-50%);
}
/* The shared fadeIn animates transform, which would drop the centring translate */
#screen-flappybird.active { animation-name: portraitFadeIn; }
@keyframes portraitFadeIn {
    from { opacity: 0; transform: translateX(-50%) scale(0.97); }
    to   { opacity: 1; transform: translateX(-50%) scale(1); }
}

.flappy-ui {
    max-width: none;
    padding: 0.4rem 0.75rem;
    background: rgba(0, 0, 0, 0.25);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    min-height: 52px;
}
#flappyCanvas {
    display: block;
    width: 100%;
    flex: 1 1 0;
    height: 0;
    min-height: 0;
    touch-action: none;
}
.flappy-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: max(64px, 9vh) var(--sp-4) 0;   /* sit high so DeeDee stays visible below */
    background: rgba(0, 0, 0, 0.25);
    z-index: 20;
}
.flappy-message { max-width: 300px; }
.flappy-msg-icon {
    width: 84px;
    height: auto;
    margin: -0.5rem auto 0.4rem;
    animation: mascotBounce 1.5s ease-in-out infinite;
}
