.skaer-consent {
    --skaer-cookie-cream: #fff2d5;
    --skaer-cookie-ink: #2d1a2a;
    --skaer-cookie-orange: #ffb061;
    position: fixed;
    z-index: 99999;
    left: max(14px, env(safe-area-inset-left));
    bottom: max(14px, env(safe-area-inset-bottom));
    width: min(384px, calc(100vw - 28px));
    pointer-events: none;
    color: var(--skaer-cookie-cream);
    font: 14px/1.45 system-ui, sans-serif;
}

.skaer-consent [hidden] { display: none !important; }

#skaer-consent-panel {
    max-height: calc(100dvh - 30px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    overflow-y: auto;
    padding: 3px;
}

.skaer-goldfish {
    display: block;
    aspect-ratio: 128 / 76;
    background: url("goldfish.png") 50% 0 / 100% 400% no-repeat;
    image-rendering: pixelated;
}

.skaer-goldfish-banner {
    position: relative;
    container-type: inline-size;
    --skaer-swim-distance: clamp(6px, 2.2vw, 13px);
    width: min(calc(100% - 20px), 345px, max(280px, 62dvh));
    margin-inline: auto;
    margin-bottom: 12px;
    animation: skaer-goldfish-swim 3.2s ease-in-out;
}

.skaer-goldfish-banner .skaer-goldfish {
    filter: drop-shadow(3px 3px 0 #ffd8a3)
            drop-shadow(-2px -2px 0 #ffd8a3)
            drop-shadow(0 4px 6px #170e1790);
    animation: skaer-goldfish-flick .8s steps(1, end) 4;
}

#skaer-consent-title {
    position: absolute;
    inset-block-start: 48%;
    inset-inline-start: 58.5%;
    transform: translate(-50%, -50%);
    width: max-content;
    margin: 0;
    padding: 0;
    color: #2a1625;
    font: 800 13px/1.1 system-ui, sans-serif;
    font-size: clamp(10px, 4.15cqw, 15px);
    letter-spacing: -.025em;
    text-transform: none;
    text-align: center;
    text-shadow: 0 0 2px #ffe4aa, 0 1px #ffe4aa;
    pointer-events: auto;
}

.skaer-consent-caption {
    pointer-events: auto;
    padding-inline: 3px;
}

.skaer-consent-caption p {
    margin: 0;
    color: inherit;
    font: inherit;
    font-weight: 600;
    paint-order: stroke fill;
    -webkit-text-stroke: 2.5px #23151f;
    text-shadow: 0 1px 3px #171018, 0 1px 5px #171018;
}
.skaer-consent-caption p + p { margin-top: 5px; }

.skaer-consent-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 9px;
}
.skaer-consent-actions button { flex: 1 1 130px; }

.skaer-consent button {
    box-sizing: border-box;
    min-height: 44px;
    padding: 6px 12px;
    color: var(--skaer-cookie-ink);
    background: var(--skaer-cookie-cream);
    border: 2px solid var(--skaer-cookie-ink);
    border-radius: 999px;
    box-shadow: inset -2px -2px 0 var(--skaer-cookie-orange);
    font: 700 14px/1.3 system-ui, sans-serif;
    letter-spacing: normal;
    text-transform: none;
    cursor: pointer;
    pointer-events: auto;
}

.skaer-consent button:hover { background: #ffd499; }
.skaer-consent button:focus-visible,
#skaer-consent-title:focus-visible {
    outline: 2px solid var(--skaer-cookie-orange);
    outline-offset: 2px;
}

.skaer-consent .skaer-consent-open {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.skaer-consent-open .skaer-goldfish { width: 40px; }

@keyframes skaer-goldfish-flick {
    0%, 100% { background-position-y: 0; }
    25% { background-position-y: 33.3333%; }
    50% { background-position-y: 66.6667%; }
    75% { background-position-y: 100%; }
}
@keyframes skaer-goldfish-swim {
    0% { transform: translate(calc(-1 * var(--skaer-swim-distance)), 2px) rotate(-2deg); }
    45% { transform: translate(var(--skaer-swim-distance), -5px) rotate(1deg); }
    72% { transform: translate(6px, 1px); }
    100% { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    .skaer-goldfish-banner,
    .skaer-goldfish-banner .skaer-goldfish { animation: none; }
}
