body { overflow-x: hidden !important; width: 100%; position: relative; }

.awurudu-koha {
    position: absolute;
    top: 0;
    left: 0;
    width: 150px;
    height: 150px;
    z-index: 9997;
    pointer-events: none;
    opacity: 0.95;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.3));
    transform: translate(-300px, 20vh) scaleX(1);
    transition: transform 2s ease-in-out;
    will-change: transform;
    display: flex;
    align-items: center;
    justify-content: center;
}

body.modal-open .awurudu-koha { display: none !important; }

.koha-banner {
    position: absolute;
    white-space: nowrap;
    background: linear-gradient(90deg, #8a0c0c 0%, #b81414 20%, #d61c1c 50%, #b81414 80%, #8a0c0c 100%);
    color: #ffe899;
    padding: 8px 15px 8px 35px;
    border-radius: 0 5px 5px 0;
    font-size: 14px;
    font-weight: 800;
    font-family: inherit;
    letter-spacing: 1.5px;
    right: 90px;
    top: 105px;
    z-index: -2;
    border-top: 2px solid #ffd700;
    border-bottom: 2px solid #ffd700;
    border-right: 2px solid #ffd700;
    filter: drop-shadow(0 6px 15px rgba(0,0,0,0.5));
    clip-path: polygon(0% 0%, 18px 50%, 0% 100%, 100% 100%, 100% 0%);
    transform-origin: right center;
    animation: koha-banner-flutter 2s infinite ease-in-out;
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: 12px;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
}

/* Counter-flip keyframes — scaleX(var(--koha-facing)) cancels parent flip */
@keyframes koha-banner-flutter {
    0%, 100% { transform: scaleX(calc(1 / var(--koha-facing, 1))) translateY(0px) rotate(-1deg); }
    50%       { transform: scaleX(calc(1 / var(--koha-facing, 1))) translateY(-4px) rotate(2deg); }
}

.koha-banner::before {
    content: '❁';
    font-size: 18px;
    color: #ffd700;
    filter: drop-shadow(0 0 2px #ff6600);
    line-height: 1;
    display: inline-block;
}

.awurudu-koha:not(.is-flying) .koha-banner::before {
    animation: koha-flower-spin 4s infinite linear;
}

@keyframes koha-flower-spin {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.koha-banner-text {
    display: inline-block;
}

@keyframes koha-flap-front {
    0%   { transform: rotate(35deg) scaleY(1.1) skewX(-5deg); animation-timing-function: ease-in; }
    40%  { transform: rotate(-10deg) scaleY(0.4) skewX(5deg); animation-timing-function: ease-out; }
    50%  { transform: rotate(-55deg) scaleY(0.95) skewX(10deg); animation-timing-function: ease-in-out; }
    85%  { transform: rotate(10deg) scaleY(0.6) skewX(-5deg); animation-timing-function: ease-in-out; }
    100% { transform: rotate(35deg) scaleY(1.1) skewX(-5deg); }
}
@keyframes koha-flap-back {
    0%   { transform: rotate(45deg) scaleY(0.9) skewX(-5deg); animation-timing-function: ease-in; }
    40%  { transform: rotate(-5deg) scaleY(0.3) skewX(5deg); animation-timing-function: ease-out; }
    50%  { transform: rotate(-45deg) scaleY(0.8) skewX(10deg); animation-timing-function: ease-in-out; }
    85%  { transform: rotate(20deg) scaleY(0.5) skewX(-5deg); animation-timing-function: ease-in-out; }
    100% { transform: rotate(45deg) scaleY(0.9) skewX(-5deg); }
}
@keyframes koha-tail-bob {
    0%   { transform: rotate(3deg); }
    100% { transform: rotate(-5deg); }
}
@keyframes koha-body-breathe {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-3px); }
}
@keyframes koha-sing-open {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(12deg); }
}

.awurudu-koha.is-flying .koha-wing-front { transform-origin: 100px 92px; animation: koha-flap-front 0.35s infinite linear; }
.awurudu-koha.is-flying .koha-wing-back  { transform-origin: 90px 88px;  animation: koha-flap-back  0.35s infinite linear; }
.awurudu-koha.is-flying .koha-tail       { transform-origin: 65px 105px; animation: koha-tail-bob 0.35s infinite alternate ease-in-out; }
.awurudu-koha.is-flying .koha-legs       { transform: translateY(-8px) rotate(-40deg); opacity: 0; transition: all 0.4s ease; }

.awurudu-koha:not(.is-flying) .koha-wing-front { transform-origin: 100px 92px; transform: rotate(-35deg) scaleY(0.7) scaleX(0.9); transition: transform 0.6s cubic-bezier(0.2,0.8,0.2,1); }
.awurudu-koha:not(.is-flying) .koha-wing-back  { transform-origin: 90px 88px;  transform: rotate(-30deg) scaleY(0.6) scaleX(0.8); transition: transform 0.6s cubic-bezier(0.2,0.8,0.2,1); }
.awurudu-koha:not(.is-flying) .koha-legs       { transform: translateY(0) rotate(0); opacity: 1; transition: all 0.4s ease; }
.awurudu-koha:not(.is-flying) svg              { animation: koha-body-breathe 3s infinite ease-in-out; }

.koha-head { transform-origin: 140px 100px; transition: transform 0.4s ease-in-out; }
.awurudu-koha.is-looking .koha-head { transform: rotate(-12deg); }

.koha-beak { transform-origin: 183px 85px; transition: transform 0.2s ease-in-out; }
.awurudu-koha.is-singing .koha-beak { animation: koha-sing-open 0.15s infinite alternate ease-in-out; }

@media (max-width: 768px) {
    .awurudu-koha { width: 80px; height: 80px; }
    .koha-banner {
        font-size: 10px !important;
        padding: 4px 10px 4px 25px !important;
        right: 50px !important;
        top: 55px !important;
    }
    .koha-banner::before { font-size: 12px !important; }
}