html,
body {
    min-height: 100%;
    margin: 0;
    padding: 0;
    background: #08172b;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    min-height: 100dvh;
    color: #f1f7ff;
    font-family: "Segoe UI", Arial, Helvetica, sans-serif;
    line-height: 1.5;
    overflow-x: hidden;
    overscroll-behavior-x: none;
}

/* Blazor normally displays a generic white reconnect panel. The site reloads the
   current route instead, so the framework status element must stay invisible. */
#components-reconnect-modal {
    display: none !important;
}

button,
a,
input,
select,
textarea {
    -webkit-tap-highlight-color: transparent;
}

* {
    scrollbar-width: thin;
    scrollbar-color: #a95834 #35170f;
}

*::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

*::-webkit-scrollbar-track {
    border: 1px solid #744128;
    border-radius: 9px;
    background: #35170f;
    box-shadow: inset 0 0 0 2px #170905;
}

*::-webkit-scrollbar-thumb {
    min-width: 34px;
    min-height: 34px;
    border: 2px solid #35170f;
    border-radius: 9px;
    background: linear-gradient(180deg, #c77449, #8b3f25);
    box-shadow: inset 0 0 0 2px rgb(255 255 255 / 24%);
}

*::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #e39a50, #a65329);
}

*::-webkit-scrollbar-corner {
    background: #35170f;
}

@media (max-width: 760px) {
    *::-webkit-scrollbar {
        width: 9px;
        height: 9px;
    }
}

@media (hover: none) and (pointer: coarse) {
    button,
    a,
    summary,
    input:not([type="range"]),
    select {
        touch-action: manipulation;
    }
}
body.site-dialogue-copy-interrupt .site-dialogue:not(.browser-secret-dialogue) {
    visibility: hidden;
    pointer-events: none;
}

/* Quarantine deliberately reaches outside its page when KILLBOT damages the site shell. */
body.quarantine-collapse .site-audio-control {
    transform-origin: 50% 0;
    animation: quarantine-global-control-rattle 1.7s steps(1, end) infinite;
}

body.quarantine-collapse-catastrophic .site-audio-control {
    pointer-events: none;
    animation: quarantine-global-volume-fall 1.45s cubic-bezier(0.35, 0.02, 0.72, 1) forwards;
}

body.quarantine-collapse-catastrophic .site-menu-toggle {
    z-index: 1701;
    pointer-events: none;
    animation: quarantine-global-menu-fall 1.8s 0.18s cubic-bezier(0.35, 0.02, 0.72, 1) forwards;
}

body.quarantine-collapse-catastrophic .quarantine-header {
    animation: quarantine-global-header-break 3.2s 0.25s cubic-bezier(0.32, 0.05, 0.68, 1) forwards;
}

@keyframes quarantine-global-control-rattle {
    0%,
    82%,
    100% {
        transform: translate(0);
        filter: none;
    }
    83% {
        transform: translate(-3px, 1px);
        filter: drop-shadow(4px 0 #ff2548) drop-shadow(-4px 0 #16f5e2);
    }
    86% {
        transform: translate(3px, -2px);
    }
    89% {
        transform: translate(0);
        filter: none;
    }
}

@keyframes quarantine-global-volume-fall {
    0% {
        transform: translate(0) rotate(0);
    }
    12% {
        transform: translate(4px, -3px) rotate(5deg);
    }
    25% {
        transform: translate(-2px, 8vh) rotate(-13deg);
    }
    100% {
        transform: translate(16vw, 92vh) rotate(430deg);
    }
}

@keyframes quarantine-global-menu-fall {
    0% {
        transform: translate(0) rotate(0);
    }
    18% {
        transform: translate(-3px, 3px) rotate(-8deg);
    }
    100% {
        transform: translate(-8vw, 88vh) rotate(-390deg);
    }
}

@keyframes quarantine-global-header-break {
    0% {
        transform: skewX(-4deg);
    }
    16% {
        transform: skewX(8deg) rotate(1deg);
    }
    33% {
        transform: skewX(-2deg) rotate(-1deg);
    }
    100% {
        transform: translateY(76vh) rotate(7deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    body.quarantine-collapse .site-audio-control,
    body.quarantine-collapse-catastrophic .site-audio-control,
    body.quarantine-collapse-catastrophic .site-menu-toggle,
    body.quarantine-collapse-catastrophic .quarantine-header {
        animation: none;
    }
}
