:root {
    color-scheme: dark;
    --logical-width: 1920px;
    --logical-height: 1080px;
    --bg-black: #050304;
    --panel-black: rgba(8, 6, 8, 0.92);
    --panel-deep: rgba(16, 11, 14, 0.95);
    --shadow-black: rgba(0, 0, 0, 0.8);
    --ember: #ff7d49;
    --ember-soft: #ffb492;
    --blood: #7a120d;
    --blood-glow: rgba(140, 22, 18, 0.55);
    --cream: #ffefe3;
    --button-dark: #180608;
    --button-fill: #5f1210;
    --button-border: #e57a46;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    background: #000;
    font-family: "ITC Benguiat", "Benguiat", "Bookman Old Style", "Palatino Linotype", Georgia, "Times New Roman", serif;
}

body {
    overflow: hidden;
}

button,
img {
    user-select: none;
    -webkit-user-drag: none;
}

#app {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 18%, rgba(156, 28, 17, 0.25), transparent 34%),
        #000;
}

.selection-notice {
    position: absolute;
    top: 18px;
    left: 50%;
    z-index: 60;
    width: min(920px, calc(100vw - 40px));
    padding: 12px 16px;
    border: 1px solid rgba(255, 188, 132, 0.46);
    border-radius: 10px;
    background: rgba(38, 12, 10, 0.9);
    box-shadow:
        0 14px 28px rgba(0, 0, 0, 0.28),
        0 0 24px rgba(132, 26, 18, 0.16);
    color: rgba(255, 233, 214, 0.96);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: 0.02em;
    text-align: center;
    transform: translateX(-50%);
    pointer-events: none;
}

.runtime-error {
    position: absolute;
    top: 18px;
    left: 50%;
    z-index: 140;
    width: min(980px, calc(100vw - 40px));
    padding: 14px 18px;
    border: 1px solid rgba(255, 142, 132, 0.72);
    border-radius: 10px;
    background: rgba(54, 8, 8, 0.94);
    box-shadow:
        0 18px 34px rgba(0, 0, 0, 0.42),
        0 0 28px rgba(168, 30, 24, 0.28);
    color: rgba(255, 236, 228, 0.98);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 0.02em;
    text-align: center;
    transform: translateX(-50%);
    pointer-events: none;
    white-space: pre-line;
}

#scene {
    position: absolute;
    width: var(--logical-width);
    height: var(--logical-height);
    overflow: hidden;
    background: #000;
    transform-origin: center center;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

.screen,
.modal-overlay,
.layer {
    position: absolute;
    inset: 0;
}

.hidden {
    display: none !important;
}

#menu-screen {
    isolation: isolate;
    background-image: linear-gradient(rgba(5, 3, 4, 0.24), rgba(5, 3, 4, 0.42));
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

#game-screen {
    background-image: linear-gradient(rgba(5, 3, 4, 0.1), rgba(5, 3, 4, 0.2));
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

.screen-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 50% 52%, rgba(12, 6, 6, 0.1), transparent 24%),
        linear-gradient(180deg, rgba(10, 5, 6, 0.1), rgba(10, 5, 6, 0.42));
    pointer-events: none;
}

.menu-content {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: auto;
}

#menu-logo {
    position: absolute;
    top: 104px;
    left: 50%;
    width: 460px;
    max-width: 60%;
    transform: translateX(-50%);
    pointer-events: none;
    filter: drop-shadow(0 14px 28px rgba(0, 0, 0, 0.5));
}

.menu-title {
    margin: 0;
    position: absolute;
    top: 486px;
    left: 50%;
    width: min(980px, calc(100% - 280px));
    transform: translateX(-50%);
    color: var(--ember);
    font-size: 54px;
    line-height: 1.08;
    letter-spacing: 0.04em;
    text-align: center;
    text-shadow:
        0 4px 10px rgba(0, 0, 0, 0.68),
        0 0 24px rgba(110, 20, 16, 0.5);
    pointer-events: none;
}

.waiting-panel {
    position: absolute;
    top: 624px;
    left: 50%;
    z-index: 3;
    width: min(1120px, calc(100% - 280px));
    min-height: 126px;
    padding: 18px 24px 22px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    border: 1px solid rgba(229, 122, 70, 0.42);
    border-radius: 28px;
    background:
        linear-gradient(180deg, rgba(255, 189, 123, 0.08), transparent 34%),
        rgba(10, 6, 8, 0.8);
    box-shadow:
        0 18px 34px rgba(0, 0, 0, 0.28),
        0 0 24px rgba(120, 18, 14, 0.2);
    transform: translateX(-50%);
    pointer-events: none;
}

.waiting-panel__title {
    margin: 0;
    color: rgba(255, 191, 136, 0.92);
    font-size: 26px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-align: center;
    text-transform: uppercase;
    text-shadow:
        0 2px 8px rgba(0, 0, 0, 0.72),
        0 0 16px rgba(120, 18, 14, 0.24);
}

.waiting-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    min-height: 48px;
}

.waiting-list__empty {
    margin: 6px 0 0;
    color: rgba(255, 239, 227, 0.72);
    font-size: 24px;
    letter-spacing: 0.02em;
    text-align: center;
    width: 100%;
}

.waiting-student {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 52px;
    padding: 8px 16px 8px 10px;
    border: 1px solid rgba(255, 181, 126, 0.24);
    border-radius: 999px;
    background:
        linear-gradient(180deg, rgba(255, 176, 110, 0.08), transparent 36%),
        rgba(18, 10, 12, 0.82);
    box-shadow:
        inset 0 1px 0 rgba(255, 224, 182, 0.08),
        0 10px 18px rgba(0, 0, 0, 0.18);
}

.waiting-student__avatar-shell {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 196, 132, 0.26);
}

.waiting-student__avatar {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.waiting-student__label {
    color: var(--cream);
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
}

.menu-buttons {
    position: absolute;
    top: 812px;
    left: 50%;
    transform: translateX(-50%);
    width: 538px;
    display: flex;
    flex-direction: column;
    gap: 40px;
    z-index: 3;
    pointer-events: auto;
}

.menu-button,
.control-button,
.modal-button {
    pointer-events: auto;
    border: 2px solid var(--button-border);
    border-radius: 999px;
    background:
        linear-gradient(180deg, rgba(255, 176, 110, 0.15), transparent 35%),
        linear-gradient(180deg, rgba(16, 4, 6, 0.95), rgba(96, 18, 16, 0.94));
    color: var(--cream);
    font: inherit;
    font-weight: 700;
    letter-spacing: 0.06em;
    cursor: pointer;
    transition:
        transform 120ms ease,
        box-shadow 120ms ease,
        filter 120ms ease,
        opacity 120ms ease;
}

.menu-button {
    position: relative;
    z-index: 4;
    width: 100%;
    min-height: 88px;
    font-size: 46px;
    box-shadow:
        0 0 0 1px rgba(255, 170, 104, 0.24) inset,
        0 16px 28px rgba(0, 0, 0, 0.34),
        0 0 28px rgba(128, 24, 14, 0.3);
    text-shadow:
        0 2px 6px rgba(0, 0, 0, 0.75),
        0 0 12px rgba(126, 26, 18, 0.55);
}

.menu-button:hover:not(:disabled),
.control-button:hover:not(:disabled),
.modal-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow:
        0 18px 34px rgba(0, 0, 0, 0.42),
        0 0 34px rgba(142, 28, 20, 0.44);
    filter: brightness(1.05);
}

.menu-button:disabled,
.control-button:disabled,
.modal-button:disabled {
    opacity: 0.5;
    cursor: default;
}

#board-header {
    position: absolute;
    top: -207px;
    left: 50%;
    transform: translateX(-50%);
    width: 968px;
    pointer-events: none;
    filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.38));
}

.turn-indicator {
    position: absolute;
    top: 34px;
    left: 36px;
    z-index: 22;
    min-height: 58px;
    padding: 12px 22px;
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: rgba(14, 8, 10, 0.78);
    border: 2px solid rgba(184, 50, 34, 0.78);
    color: var(--ember);
    font-size: 32px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-shadow:
        0 2px 6px rgba(0, 0, 0, 0.78),
        0 0 12px rgba(116, 18, 14, 0.42);
    box-shadow:
        0 12px 24px rgba(0, 0, 0, 0.24),
        0 0 24px rgba(120, 22, 14, 0.18);
}

.layer {
    pointer-events: none;
}

#avatars-layer {
    pointer-events: none;
}

.board-object,
.avatar-token {
    position: absolute;
    transform: translate(-50%, -50%);
    transform-origin: center;
}

.board-object {
    pointer-events: none;
    transform: translate(-50%, -50%) scale(var(--object-display-scale, 1));
    filter: drop-shadow(0 10px 12px rgba(0, 0, 0, 0.26));
    isolation: isolate;
    overflow: visible;
}

.board-object-hot-core,
.board-object-image,
.board-object-ember-glow,
.board-object-char-layer,
.board-object-ash-veil,
.board-object-particle-layer {
    position: absolute;
    pointer-events: none;
}

.board-object-hot-core {
    inset: -12% -10% -2% -10%;
    z-index: 1;
    opacity: 0;
    background:
        radial-gradient(circle at var(--crumble-core-x, 50%) var(--crumble-core-y, 20%), rgba(255, 242, 188, 0.98) 0 5%, rgba(255, 148, 62, 0.94) 9%, rgba(182, 28, 12, 0.74) 18%, rgba(34, 6, 4, 0) 40%),
        radial-gradient(circle at var(--crumble-glow-x, 42%) var(--crumble-glow-y, 34%), rgba(255, 120, 52, 0.7), rgba(120, 20, 10, 0.3) 26%, rgba(18, 4, 4, 0) 58%),
        radial-gradient(circle at var(--crumble-glow-x-2, 28%) var(--crumble-glow-y-2, 62%), rgba(255, 164, 88, 0.42), rgba(110, 18, 12, 0.18) 22%, rgba(18, 4, 4, 0) 52%);
    filter: blur(16px) saturate(1.85) brightness(1.12);
    mix-blend-mode: screen;
}

.board-object-image {
    position: relative;
    inset: 0;
    z-index: 3;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.board-object-ember-glow {
    inset: -10% -12% -8% -12%;
    z-index: 4;
    opacity: 0;
    background:
        radial-gradient(circle at var(--crumble-hot-edge-x, 50%) var(--crumble-hot-edge-y, 18%), rgba(255, 248, 214, 1) 0 3%, rgba(255, 156, 68, 0.96) 7%, rgba(198, 34, 12, 0.72) 16%, rgba(40, 6, 4, 0) 32%),
        radial-gradient(circle at 22% 78%, rgba(255, 112, 56, 0.34), rgba(84, 10, 8, 0) 22%),
        radial-gradient(circle at 82% 72%, rgba(255, 136, 62, 0.28), rgba(76, 8, 6, 0) 18%);
    filter: blur(9px) saturate(2.1) brightness(1.2);
    mix-blend-mode: screen;
}

.board-object-char-layer {
    inset: -4% -3% -6% -3%;
    z-index: 5;
    opacity: 0;
    background:
        linear-gradient(var(--crumble-fracture-angle, 12deg), rgba(255, 166, 98, 0.18) 0 2%, rgba(18, 10, 10, 0) 8% 18%, rgba(0, 0, 0, 0.42) 24% 34%, rgba(0, 0, 0, 0) 44% 56%, rgba(8, 4, 4, 0.7) 66% 78%, rgba(0, 0, 0, 0) 86% 100%),
        repeating-linear-gradient(112deg, rgba(255, 144, 82, 0.12) 0 2%, rgba(18, 10, 10, 0.04) 2.5% 7%, rgba(6, 4, 4, 0.5) 8% 15%, rgba(0, 0, 0, 0) 17% 28%),
        radial-gradient(circle at 18% 22%, rgba(255, 168, 102, 0.26), rgba(46, 18, 14, 0) 18%),
        radial-gradient(circle at 74% 30%, rgba(255, 118, 66, 0.18), rgba(40, 14, 10, 0) 16%),
        linear-gradient(180deg, rgba(10, 8, 8, 0.06), rgba(0, 0, 0, 0.78));
    filter: blur(0.55px) contrast(1.24) saturate(1.04);
    mix-blend-mode: multiply;
}

.board-object-ash-veil {
    inset: -10% -10% -14% -10%;
    z-index: 6;
    opacity: 0;
    background:
        radial-gradient(circle at 18% 18%, rgba(255, 176, 102, 0.16), transparent 9%),
        radial-gradient(circle at 74% 24%, rgba(255, 112, 60, 0.14), transparent 8%),
        radial-gradient(circle at 32% 58%, rgba(72, 62, 58, 0.34), transparent 18%),
        radial-gradient(circle at 66% 70%, rgba(22, 16, 16, 0.42), transparent 14%),
        repeating-linear-gradient(102deg, rgba(255, 244, 228, 0.08) 0 1.6%, rgba(0, 0, 0, 0) 2% 8.6%),
        linear-gradient(180deg, rgba(255, 136, 70, 0.06), rgba(64, 28, 18, 0.18) 34%, rgba(10, 8, 8, 0.64) 100%);
    filter: blur(0.65px) contrast(1.16);
}

.board-object-particle-layer {
    inset: -22% -18% -28% -18%;
    overflow: visible;
}

.board-object-particle-layer--ash {
    z-index: 7;
}

.board-object-particle-layer--ember {
    z-index: 8;
}

.board-object-particle {
    position: absolute;
    left: var(--particle-start-x, 50%);
    top: var(--particle-start-y, 50%);
    width: var(--particle-width, 4px);
    height: var(--particle-height, 4px);
    border-radius: var(--particle-radius, 999px);
    opacity: 0;
    transform: translate(-50%, -50%) scale(var(--particle-scale, 1));
    will-change: transform, opacity, filter;
}

.ash-particle {
    background:
        radial-gradient(circle at 32% 26%, rgba(180, 172, 164, 0.94) 0 12%, rgba(126, 118, 112, 0.92) 34%, rgba(54, 48, 46, 0.92) 72%, rgba(16, 12, 12, 0.08) 100%);
    box-shadow:
        0 0 6px rgba(28, 24, 24, 0.36),
        0 0 16px rgba(18, 14, 14, 0.18);
}

.ember-particle {
    background:
        radial-gradient(circle, rgba(255, 248, 220, 1) 0 16%, rgba(255, 176, 78, 0.98) 32%, rgba(255, 88, 32, 0.94) 56%, rgba(128, 14, 8, 0.82) 78%, rgba(24, 4, 4, 0) 100%);
    box-shadow:
        0 0 10px rgba(255, 136, 58, 0.66),
        0 0 22px rgba(180, 24, 10, 0.42);
    mix-blend-mode: screen;
}

.board-object.is-clickable {
    pointer-events: auto;
    cursor: pointer;
}

.board-object.finale-crumble-object {
    animation: scarecrow-crumble-main var(--finale-crumble-duration, 0ms) linear forwards;
    animation-delay: calc(var(--finale-crumble-delay, 0ms) + var(--finale-crumble-playhead-offset, 0ms));
    transform-origin: center 72%;
    will-change: transform;
    z-index: 22;
}

.board-object.finale-crumble-object .board-object-image {
    animation: scarecrow-crumble-image var(--finale-crumble-duration, 0ms) linear forwards;
    animation-delay: calc(var(--finale-crumble-delay, 0ms) + var(--finale-crumble-playhead-offset, 0ms));
    transform-origin: center 72%;
    will-change: filter, opacity, transform;
}

.board-object.finale-crumble-object .board-object-hot-core {
    animation: scarecrow-ember-glow var(--finale-crumble-duration, 0ms) linear forwards;
    animation-delay: calc(var(--finale-crumble-delay, 0ms) + var(--finale-crumble-playhead-offset, 0ms));
}

.board-object.finale-crumble-object .board-object-ember-glow {
    animation: scarecrow-ember-glow var(--finale-crumble-duration, 0ms) linear forwards;
    animation-delay: calc(var(--finale-crumble-delay, 0ms) + 60ms + var(--finale-crumble-playhead-offset, 0ms));
}

.board-object.finale-crumble-object .board-object-char-layer {
    animation: scarecrow-charred-collapse var(--finale-crumble-duration, 0ms) linear forwards;
    animation-delay: calc(var(--finale-crumble-delay, 0ms) + 120ms + var(--finale-crumble-playhead-offset, 0ms));
}

.board-object.finale-crumble-object .board-object-ash-veil {
    animation: scarecrow-ash-breakup var(--finale-crumble-duration, 0ms) linear forwards;
    animation-delay: calc(var(--finale-crumble-delay, 0ms) + 180ms + var(--finale-crumble-playhead-offset, 0ms));
}

.board-object.finale-crumble-object .ash-particle {
    animation: ash-particle-fall var(--particle-duration, 1600ms) cubic-bezier(0.18, 0.62, 0.26, 1) forwards;
    animation-delay: calc(var(--finale-crumble-delay, 0ms) + var(--particle-delay, 0ms) + var(--finale-crumble-playhead-offset, 0ms));
}

.board-object.finale-crumble-object .ember-particle {
    animation: ember-particle-rise var(--particle-duration, 920ms) ease-out forwards;
    animation-delay: calc(var(--finale-crumble-delay, 0ms) + var(--particle-delay, 0ms) + var(--finale-crumble-playhead-offset, 0ms));
}

.avatar-token {
    width: 124px;
    height: 188px;
    pointer-events: auto;
    touch-action: none;
    cursor: grab;
}

.avatar {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    pointer-events: none;
    filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.36));
}

.avatar-token.is-active .avatar {
    outline: 3px solid rgba(255, 124, 72, 0.72);
    outline-offset: 8px;
    border-radius: 1.3rem;
    filter:
        drop-shadow(0 14px 20px rgba(0, 0, 0, 0.4))
        drop-shadow(0 0 22px rgba(255, 118, 68, 0.34));
}

.avatar-token.dragging {
    cursor: grabbing;
    z-index: 25;
}

.avatar-token.dragging .avatar {
    filter:
        drop-shadow(0 16px 26px rgba(0, 0, 0, 0.45))
        drop-shadow(0 0 18px rgba(255, 124, 72, 0.22));
}

.avatar-token.is-locked {
    cursor: not-allowed;
}

.avatar-token.is-locked .avatar {
    opacity: 0.84;
}

.avatar-token.is-other-player {
    cursor: not-allowed;
}

.avatar-token.is-other-player .avatar {
    opacity: 0.72;
    filter:
        grayscale(0.14)
        drop-shadow(0 12px 18px rgba(0, 0, 0, 0.34));
}

.avatar-token.is-marked-incorrect::before,
.avatar-token.is-marked-incorrect::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 14px;
    height: 196px;
    border-radius: 999px;
    background:
        linear-gradient(180deg, rgba(255, 222, 222, 0.98), rgba(255, 86, 58, 0.96) 25%, rgba(164, 0, 0, 0.98));
    box-shadow:
        0 0 0 2px rgba(50, 0, 0, 0.35),
        0 0 18px rgba(195, 18, 8, 0.48);
    pointer-events: none;
}

.avatar-token.is-marked-incorrect::before {
    transform: translate(-50%, -50%) rotate(42deg);
}

.avatar-token.is-marked-incorrect::after {
    transform: translate(-50%, -50%) rotate(-42deg);
}

.teacher-controls {
    position: absolute;
    top: 22px;
    right: 38px;
    z-index: 30;
    display: flex;
    gap: 10px;
    align-items: center;
}

.teacher-group-controls {
    display: flex;
    gap: 10px;
}

.control-button {
    padding: 14px 20px;
    font-size: 20px;
    background:
        linear-gradient(180deg, rgba(255, 176, 110, 0.12), transparent 35%),
        linear-gradient(180deg, rgba(10, 4, 5, 0.88), rgba(62, 12, 12, 0.9));
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.75);
}

.control-button.is-active {
    box-shadow:
        0 0 0 1px rgba(255, 181, 126, 0.32) inset,
        0 0 26px rgba(160, 36, 20, 0.42);
    filter: brightness(1.08);
}

.student-identity-bar {
    position: absolute;
    top: 22px;
    right: 38px;
    z-index: 31;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px 10px 18px;
    border: 1px solid rgba(229, 122, 70, 0.48);
    border-radius: 999px;
    background:
        linear-gradient(180deg, rgba(255, 183, 118, 0.08), transparent 42%),
        rgba(14, 8, 10, 0.84);
    box-shadow:
        0 14px 26px rgba(0, 0, 0, 0.24),
        0 0 22px rgba(104, 16, 14, 0.18);
}

.student-identity-label {
    color: var(--cream);
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.72);
}

.student-identity-button {
    padding: 12px 18px;
    font-size: 18px;
}

.student-name-gate {
    position: absolute;
    inset: 0;
    z-index: 110;
    display: grid;
    place-items: stretch;
    isolation: isolate;
    padding: 0;
}

.student-name-gate__backdrop {
    position: absolute;
    inset: 0;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

.student-name-gate__card {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    padding: 0;
    border: none;
    border-radius: 0;
    background: none;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    overflow-x: hidden;
    overflow-y: auto;
}

.student-name-gate__content {
    width: min(1520px, calc(100% - 120px));
    margin: 0 auto 58px;
    padding: 0 0 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
}

.student-name-gate__heading {
    margin: 0;
    color: rgba(255, 180, 129, 0.82);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    text-align: center;
    text-shadow:
        0 4px 12px rgba(0, 0, 0, 0.7),
        0 0 18px rgba(120, 18, 14, 0.24);
}

.student-name-options,
.student-choice-grid,
.student-choice-sections {
    width: 100%;
    flex: 0 0 auto;
    margin-top: 0;
    display: flex;
    flex-direction: column;
    gap: 24px;
    overflow-y: visible;
    overflow-x: hidden;
    padding: 0 8px 8px;
    scrollbar-gutter: stable;
}

.student-choice-empty {
    margin: 56px 0 0;
    color: rgba(255, 239, 227, 0.78);
    font-size: 26px;
    letter-spacing: 0.03em;
    text-align: center;
}

.student-choice-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.student-choice-section-title {
    margin: 0;
    color: rgba(255, 191, 136, 0.92);
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 0.24em;
    text-align: center;
    text-transform: uppercase;
    text-shadow:
        0 4px 12px rgba(0, 0, 0, 0.7),
        0 0 18px rgba(120, 18, 14, 0.28);
}

.student-choice-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.student-name-option {
    width: 200px;
    flex: 0 0 200px;
    min-width: 0;
    padding: 24px 18px 20px;
    border: 1px solid rgba(229, 122, 70, 0.56);
    border-radius: 30px;
    background:
        linear-gradient(180deg, rgba(255, 189, 123, 0.12), transparent 38%),
        rgba(12, 7, 9, 0.74);
    color: var(--cream);
    font: inherit;
    cursor: pointer;
    text-align: center;
    box-shadow:
        0 14px 24px rgba(0, 0, 0, 0.26),
        0 0 18px rgba(120, 18, 14, 0.18);
    transition:
        transform 120ms ease,
        box-shadow 120ms ease,
        border-color 120ms ease,
        background 120ms ease;
}

.student-name-option:hover,
.student-name-option:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(255, 183, 118, 0.82);
    box-shadow:
        0 18px 30px rgba(0, 0, 0, 0.3),
        0 0 24px rgba(120, 18, 14, 0.28);
    outline: none;
}

.student-choice-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
    min-height: 286px;
}

.student-choice-card:active {
    transform: translateY(0) scale(0.985);
}

.student-choice-card.is-selected {
    border-color: rgba(255, 196, 132, 0.92);
    box-shadow:
        0 18px 34px rgba(0, 0, 0, 0.34),
        0 0 30px rgba(150, 32, 18, 0.36);
}

.student-choice-avatar-shell {
    width: 152px;
    height: 152px;
    border: 1px solid rgba(255, 188, 130, 0.38);
    border-radius: 38px;
    background:
        radial-gradient(circle at 50% 18%, rgba(255, 211, 151, 0.22), transparent 48%),
        linear-gradient(180deg, rgba(34, 16, 20, 0.96), rgba(10, 5, 7, 0.96));
    box-shadow:
        inset 0 1px 0 rgba(255, 224, 182, 0.18),
        0 10px 24px rgba(0, 0, 0, 0.28);
    overflow: hidden;
}

.student-choice-avatar {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.student-choice-card--text-only {
    justify-content: center;
    min-height: 120px;
}

.student-choice-card--text-only .student-choice-avatar-shell {
    display: none;
}

.student-name-option__name {
    display: block;
    font-size: 34px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.78);
}

.student-name-option__group {
    display: block;
    margin-top: 2px;
    color: rgba(255, 190, 134, 0.8);
    font-size: 18px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
}

.student-choice-name {
    line-height: 1.1;
}

.student-choice-group {
    margin-top: 0;
}

@media (max-width: 980px) {
    .menu-title {
        top: 450px;
        width: min(820px, calc(100% - 120px));
        font-size: 46px;
    }

    .waiting-panel {
        top: 578px;
        width: min(940px, calc(100% - 120px));
        min-height: 116px;
        padding: 16px 20px 20px;
    }

    .waiting-panel__title {
        font-size: 24px;
    }

    .waiting-student__label,
    .waiting-list__empty {
        font-size: 22px;
    }

    .menu-buttons {
        top: 756px;
    }

    .student-name-gate {
        padding: 0;
    }

    .student-name-gate__card {
        justify-content: flex-end;
    }

    .student-name-gate__content {
        width: min(1360px, calc(100% - 64px));
        margin-bottom: 44px;
        gap: 16px;
    }

    .student-name-gate__heading {
        font-size: 18px;
    }

    .student-name-options,
    .student-choice-grid,
    .student-choice-sections {
        gap: 18px;
        padding: 0 2px 6px;
    }

    .student-choice-section-title {
        font-size: 22px;
    }

    .student-choice-row {
        gap: 18px;
    }

    .student-name-option {
        width: 184px;
        flex-basis: 184px;
    }

    .student-choice-card {
        min-height: 264px;
    }

    .student-choice-avatar-shell {
        width: 140px;
        height: 140px;
        border-radius: 34px;
    }

    .student-name-option__name {
        font-size: 30px;
    }
}

@media (max-height: 820px) {
    .student-name-gate__content {
        margin-bottom: 34px;
        gap: 14px;
    }

    .student-name-gate__heading {
        font-size: 18px;
    }

    .student-name-options,
    .student-choice-grid,
    .student-choice-sections {
        gap: 16px;
    }

    .student-choice-card {
        min-height: 248px;
    }

    .student-choice-avatar-shell {
        width: 132px;
        height: 132px;
        border-radius: 32px;
    }

    .student-name-option__name {
        font-size: 28px;
    }

    .student-name-option__group {
        font-size: 16px;
    }
}

@media (max-width: 700px) {
    .menu-title {
        top: 418px;
        width: calc(100% - 72px);
        font-size: 40px;
    }

    .waiting-panel {
        top: 540px;
        width: calc(100% - 72px);
        min-height: 112px;
        padding: 14px 16px 18px;
    }

    .waiting-panel__title {
        font-size: 22px;
    }

    .waiting-student {
        padding-inline: 14px;
    }

    .waiting-student__label,
    .waiting-list__empty {
        font-size: 20px;
    }

    .menu-buttons {
        top: 742px;
        width: min(500px, calc(100% - 72px));
        gap: 28px;
    }

    .student-name-gate__heading {
        font-size: 17px;
    }

    .student-name-options,
    .student-choice-grid,
    .student-choice-sections {
        gap: 16px;
    }

    .student-choice-section-title {
        font-size: 20px;
    }

    .student-choice-row {
        gap: 16px;
    }

    .student-name-option {
        width: 170px;
        flex-basis: 170px;
        padding: 20px 14px 18px;
    }

    .student-choice-card {
        min-height: 236px;
        gap: 14px;
    }

    .student-choice-avatar-shell {
        width: 126px;
        height: 126px;
        border-radius: 30px;
    }

    .student-name-option__name {
        font-size: 26px;
    }
}

.modal-overlay {
    z-index: 60;
    display: grid;
    place-items: center;
}

.finale-overlay {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: grid;
    place-items: center;
    overflow: hidden;
    pointer-events: none;
    isolation: isolate;
    --finale-playhead-offset: 0ms;
    --finale-start-delay: 700ms;
    --finale-fade-duration: 5000ms;
    --finale-strobe-delay: 5700ms;
    --finale-strobe-duration: 5500ms;
    --finale-logo-fade-delay: 6600ms;
    --finale-logo-duration: 4500ms;
    --finale-logo-zoom-duration: 7000ms;
    --finale-logo-zoom-scale: 1.12;
    --finale-logo-flicker-delay: 6860ms;
    --finale-logo-flicker-out-delay: 16200ms;
    --finale-logo-flicker-out-duration: 3000ms;
    --finale-strobe-flash-start-color: #ffffff;
    --finale-strobe-flash-mid-color: #8b1e1e;
    --finale-strobe-flash-end-color: #240006;
}

.finale-fade-layer,
.finale-strobe-layer {
    position: absolute;
    inset: 0;
}

.finale-fade-layer {
    background: #000;
    opacity: 0;
}

.finale-overlay.is-active .finale-fade-layer {
    animation: finale-fade-to-black var(--finale-fade-duration) ease forwards;
    animation-delay: calc(var(--finale-start-delay) + var(--finale-playhead-offset));
}

.finale-strobe-layer {
    opacity: 0;
}

.finale-strobe-layer::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--finale-strobe-flash-start-color);
    opacity: 0;
}

.finale-overlay.is-active .finale-strobe-layer {
    opacity: 1;
}

.finale-overlay.is-active .finale-strobe-layer::before {
    animation: finaleStrobeBurstAndFade var(--finale-strobe-duration) linear forwards;
    animation-delay: calc(var(--finale-strobe-delay) + var(--finale-playhead-offset));
}

.finale-logo-wrap {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    opacity: 0;
    background: transparent;
    border: 0;
    outline: 0;
    box-shadow: none;
    pointer-events: none;
}

.finale-overlay.is-active .finale-logo-wrap {
    animation: finaleLogoFadeIn var(--finale-logo-duration) cubic-bezier(0.19, 0.88, 0.24, 1) calc(var(--finale-logo-fade-delay) + var(--finale-playhead-offset)) both;
}

.finale-logo-stack {
    position: relative;
    width: min(78vw, 980px);
    max-width: 85vw;
    overflow: visible;
    transform: scale(0.98);
    opacity: 0.98;
    background: transparent;
    border: 0;
    outline: 0;
    box-shadow: none;
    isolation: isolate;
    will-change: transform, opacity, filter;
}

.finale-overlay.is-active .finale-logo-stack {
    animation:
        finale-logo-presence var(--finale-logo-zoom-duration) ease-out calc(var(--finale-logo-fade-delay) + var(--finale-playhead-offset)) both,
        neonWholeSignSurge 7800ms steps(1, end) calc(var(--finale-logo-flicker-delay) + 260ms + var(--finale-playhead-offset)) infinite;
}

.finale-logo {
    display: block;
    width: 100%;
    max-height: 42vh;
    object-fit: contain;
    background: transparent !important;
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    user-select: none;
}

.finale-logo-glow-soft,
.finale-logo-glow-hot,
.finale-logo-slice {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    background: transparent !important;
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    pointer-events: none;
}

.finale-logo-glow-soft {
    z-index: 1;
    opacity: 0.28;
    filter:
        sepia(1)
        saturate(15)
        hue-rotate(-20deg)
        brightness(1.06)
        contrast(1.14)
        drop-shadow(0 0 10px rgba(255, 56, 56, 0.9))
        drop-shadow(0 0 28px rgba(224, 20, 28, 0.56))
        drop-shadow(0 0 56px rgba(120, 0, 20, 0.38));
    mix-blend-mode: screen;
}

.finale-logo-glow-hot {
    z-index: 2;
    opacity: 0.36;
    filter:
        sepia(1)
        saturate(18)
        hue-rotate(-18deg)
        brightness(1.18)
        contrast(1.16)
        drop-shadow(0 0 8px rgba(255, 126, 96, 0.82))
        drop-shadow(0 0 18px rgba(226, 34, 24, 0.46))
        drop-shadow(0 0 34px rgba(162, 10, 14, 0.26));
    mix-blend-mode: screen;
}

.finale-logo-base {
    position: relative;
    z-index: 3;
    opacity: 0.92;
    filter:
        sepia(1)
        saturate(13)
        hue-rotate(-20deg)
        brightness(0.94)
        contrast(1.14)
        drop-shadow(0 0 10px rgba(255, 140, 92, 0.42))
        drop-shadow(0 0 22px rgba(188, 24, 16, 0.3));
}

.finale-logo-slice {
    z-index: 4;
    opacity: 0.64;
    filter:
        sepia(1)
        saturate(17)
        hue-rotate(-18deg)
        brightness(1.12)
        contrast(1.18);
    mix-blend-mode: normal;
}

.finale-logo-slice-a {
    clip-path: inset(0 55% 58% 0);
}

.finale-logo-slice-b {
    clip-path: inset(0 18% 58% 38%);
}

.finale-logo-slice-c {
    clip-path: inset(38% 48% 28% 0);
}

.finale-logo-slice-d {
    clip-path: inset(38% 0 28% 45%);
}

.finale-logo-slice-e {
    clip-path: inset(70% 5% 0 5%);
}

.finale-overlay.is-active .finale-logo-base {
    animation:
        neonBasePulse 5600ms steps(1, end) calc(var(--finale-logo-flicker-delay) + 90ms + var(--finale-playhead-offset)) infinite,
        finaleLogoFlickerOutBase var(--finale-logo-flicker-out-duration) steps(1, end) calc(var(--finale-logo-flicker-out-delay) + 260ms + var(--finale-playhead-offset)) forwards;
}

.finale-overlay.is-active .finale-logo-glow-soft {
    animation:
        neonGlowPulse 4600ms steps(1, end) calc(var(--finale-logo-flicker-delay) + 40ms + var(--finale-playhead-offset)) infinite,
        neonGlowFlickerOut var(--finale-logo-flicker-out-duration) steps(1, end) calc(var(--finale-logo-flicker-out-delay) + var(--finale-playhead-offset)) forwards;
}

.finale-overlay.is-active .finale-logo-glow-hot {
    animation:
        neonHotGlowFlicker 3900ms steps(1, end) calc(var(--finale-logo-flicker-delay) + 120ms + var(--finale-playhead-offset)) infinite,
        neonGlowFlickerOut var(--finale-logo-flicker-out-duration) steps(1, end) calc(var(--finale-logo-flicker-out-delay) + 100ms + var(--finale-playhead-offset)) forwards;
}

.finale-overlay.is-active .finale-logo-slice-a {
    animation:
        neonSliceFlickerA 4100ms steps(1, end) calc(var(--finale-logo-flicker-delay) + 120ms + var(--finale-playhead-offset)) infinite,
        neonSliceFlickerOutA var(--finale-logo-flicker-out-duration) steps(1, end) calc(var(--finale-logo-flicker-out-delay) + 60ms + var(--finale-playhead-offset)) forwards;
}

.finale-overlay.is-active .finale-logo-slice-b {
    animation:
        neonSliceFlickerB 5300ms steps(1, end) calc(var(--finale-logo-flicker-delay) + 340ms + var(--finale-playhead-offset)) infinite,
        neonSliceFlickerOutB var(--finale-logo-flicker-out-duration) steps(1, end) calc(var(--finale-logo-flicker-out-delay) + 220ms + var(--finale-playhead-offset)) forwards;
}

.finale-overlay.is-active .finale-logo-slice-c {
    animation:
        neonSliceFlickerC 4700ms steps(1, end) calc(var(--finale-logo-flicker-delay) + 560ms + var(--finale-playhead-offset)) infinite,
        neonSliceFlickerOutC var(--finale-logo-flicker-out-duration) steps(1, end) calc(var(--finale-logo-flicker-out-delay) + 380ms + var(--finale-playhead-offset)) forwards;
}

.finale-overlay.is-active .finale-logo-slice-d {
    animation:
        neonSliceFlickerD 6200ms steps(1, end) calc(var(--finale-logo-flicker-delay) + 220ms + var(--finale-playhead-offset)) infinite,
        neonSliceFlickerOutD var(--finale-logo-flicker-out-duration) steps(1, end) calc(var(--finale-logo-flicker-out-delay) + 520ms + var(--finale-playhead-offset)) forwards;
}

.finale-overlay.is-active .finale-logo-slice-e {
    animation:
        neonSliceFlickerE 3800ms steps(1, end) calc(var(--finale-logo-flicker-delay) + 760ms + var(--finale-playhead-offset)) infinite,
        neonSliceFlickerOutE var(--finale-logo-flicker-out-duration) steps(1, end) calc(var(--finale-logo-flicker-out-delay) + 140ms + var(--finale-playhead-offset)) forwards;
}

.finale-overlay.strobe-finale .finale-logo-wrap {
    background: transparent;
    box-shadow: none;
    outline: 0;
}

@keyframes finale-fade-to-black {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes finaleStrobeBurstAndFade {
    0% {
        opacity: 0;
        background-color: var(--finale-strobe-flash-start-color);
    }

    0.4% {
        opacity: 0.98;
        background-color: var(--finale-strobe-flash-start-color);
    }

    0.85% {
        opacity: 0;
        background-color: var(--finale-strobe-flash-start-color);
    }

    1.2% {
        opacity: 0.94;
        background-color: var(--finale-strobe-flash-start-color);
    }

    1.6% {
        opacity: 0;
        background-color: var(--finale-strobe-flash-start-color);
    }

    2.1% {
        opacity: 0.9;
        background-color: #fff5f5;
    }

    2.45% {
        opacity: 0;
        background-color: var(--finale-strobe-flash-start-color);
    }

    3.0% {
        opacity: 0.96;
        background-color: var(--finale-strobe-flash-start-color);
    }

    3.35% {
        opacity: 0;
        background-color: var(--finale-strobe-flash-start-color);
    }

    3.95% {
        opacity: 0.88;
        background-color: #fff2f2;
    }

    4.35% {
        opacity: 0;
        background-color: #fff0f0;
    }

    5.05% {
        opacity: 0.92;
        background-color: #fff7f7;
    }

    5.45% {
        opacity: 0;
        background-color: #fff0f0;
    }

    6.2% {
        opacity: 0.86;
        background-color: #ffeded;
    }

    6.55% {
        opacity: 0;
        background-color: #ffeaea;
    }

    7.2% {
        opacity: 0.82;
        background-color: #fff3f3;
    }

    7.55% {
        opacity: 0;
        background-color: #ffe6e6;
    }

    8.3% {
        opacity: 0.84;
        background-color: #ffe6e6;
    }

    8.8% {
        opacity: 0;
        background-color: #ffdddd;
    }

    9.4% {
        opacity: 0.76;
        background-color: #ffdede;
    }

    9.8% {
        opacity: 0;
        background-color: #ffd6d6;
    }

    10.5% {
        opacity: 0.8;
        background-color: #ffd4d4;
    }

    11.05% {
        opacity: 0;
        background-color: #ffcaca;
    }

    11.9% {
        opacity: 0.72;
        background-color: #ffc9c9;
    }

    12.35% {
        opacity: 0;
        background-color: #ffbebe;
    }

    13.2% {
        opacity: 0.68;
        background-color: #ffbaba;
    }

    13.8% {
        opacity: 0;
        background-color: #ffb0b0;
    }

    14.7% {
        opacity: 0.62;
        background-color: #ffabab;
    }

    15.3% {
        opacity: 0;
        background-color: #ff9f9f;
    }

    18.4% {
        opacity: 0.56;
        background-color: #ff8d8d;
    }

    19.2% {
        opacity: 0;
        background-color: #ff8181;
    }

    22.8% {
        opacity: 0.52;
        background-color: #f16f6f;
    }

    24.3% {
        opacity: 0;
        background-color: #da5555;
    }

    29.6% {
        opacity: 0.46;
        background-color: #cf4c4c;
    }

    31.1% {
        opacity: 0;
        background-color: #b83333;
    }

    37.8% {
        opacity: 0.4;
        background-color: var(--finale-strobe-flash-mid-color);
    }

    38.9% {
        opacity: 0;
        background-color: #8d1e1e;
    }

    45.4% {
        opacity: 0.32;
        background-color: #8c1c21;
    }

    46.3% {
        opacity: 0.08;
        background-color: #76141a;
    }

    47.2% {
        opacity: 0.28;
        background-color: #7f171d;
    }

    48.1% {
        opacity: 0;
        background-color: #651118;
    }

    56.8% {
        opacity: 0.22;
        background-color: #691019;
    }

    57.7% {
        opacity: 0;
        background-color: #4c0810;
    }

    63.5% {
        opacity: 0.2;
        background-color: #5f0d16;
    }

    64.7% {
        opacity: 0.06;
        background-color: #43060e;
    }

    65.4% {
        opacity: 0.16;
        background-color: #571019;
    }

    66.1% {
        opacity: 0;
        background-color: #3b040b;
    }

    74.6% {
        opacity: 0.14;
        background-color: #43050d;
    }

    75.8% {
        opacity: 0;
        background-color: #280108;
    }

    84.2% {
        opacity: 0.09;
        background-color: #37040a;
    }

    85.4% {
        opacity: 0;
        background-color: #1a0004;
    }

    93.6% {
        opacity: 0.04;
        background-color: var(--finale-strobe-flash-end-color);
    }

    94.3% {
        opacity: 0;
        background-color: #0f0003;
    }

    98.1% {
        opacity: 0.015;
        background-color: var(--finale-strobe-flash-end-color);
    }

    100% {
        opacity: 0;
        background-color: var(--finale-strobe-flash-end-color);
    }
}

@keyframes finaleLogoFadeIn {
    from {
        opacity: 0;
    }

    14% {
        opacity: 0.04;
    }

    32% {
        opacity: 0.18;
    }

    55% {
        opacity: 0.58;
    }

    78% {
        opacity: 0.88;
    }

    to {
        opacity: 1;
    }
}

@keyframes finale-logo-presence {
    0% {
        transform: scale(0.98);
    }

    22% {
        transform: scale(1.01);
    }

    36% {
        transform: scale(1.04);
    }

    48% {
        transform: scale(1.015);
    }

    72% {
        transform: scale(1.08);
    }

    84% {
        transform: scale(1.06);
    }

    100% {
        transform: scale(var(--finale-logo-zoom-scale));
    }
}

@keyframes neonWholeSignSurge {
    0%,
    17%,
    42%,
    67%,
    100% {
        opacity: 0.985;
    }

    7% {
        opacity: 0.935;
    }

    28% {
        opacity: 1;
    }

    51% {
        opacity: 0.95;
    }

    83% {
        opacity: 0.992;
    }
}

@keyframes neonGlowPulse {
    0%,
    21%,
    49%,
    78%,
    100% {
        opacity: 0.28;
        filter:
            sepia(1)
            saturate(15)
            hue-rotate(-20deg)
            brightness(1.06)
            contrast(1.14)
            drop-shadow(0 0 10px rgba(255, 56, 56, 0.9))
            drop-shadow(0 0 28px rgba(224, 20, 28, 0.56))
            drop-shadow(0 0 56px rgba(120, 0, 20, 0.38));
    }

    11% {
        opacity: 0.18;
        filter:
            sepia(1)
            saturate(12)
            hue-rotate(-20deg)
            brightness(0.82)
            contrast(1.04)
            drop-shadow(0 0 8px rgba(255, 48, 48, 0.54))
            drop-shadow(0 0 18px rgba(180, 10, 20, 0.32))
            drop-shadow(0 0 36px rgba(88, 0, 14, 0.2));
    }

    33% {
        opacity: 0.38;
        filter:
            sepia(1)
            saturate(17)
            hue-rotate(-18deg)
            brightness(1.2)
            contrast(1.22)
            drop-shadow(0 0 12px rgba(255, 76, 64, 0.96))
            drop-shadow(0 0 32px rgba(236, 24, 30, 0.66))
            drop-shadow(0 0 64px rgba(138, 0, 18, 0.42));
    }

    61% {
        opacity: 0.16;
        filter:
            sepia(1)
            saturate(10)
            hue-rotate(-20deg)
            brightness(0.74)
            contrast(1.02)
            drop-shadow(0 0 7px rgba(255, 42, 42, 0.44))
            drop-shadow(0 0 14px rgba(156, 8, 18, 0.24))
            drop-shadow(0 0 28px rgba(76, 0, 12, 0.16));
    }

    88% {
        opacity: 0.32;
        filter:
            sepia(1)
            saturate(16)
            hue-rotate(-19deg)
            brightness(1.12)
            contrast(1.2)
            drop-shadow(0 0 11px rgba(255, 72, 60, 0.88))
            drop-shadow(0 0 28px rgba(222, 20, 28, 0.58))
            drop-shadow(0 0 58px rgba(126, 0, 18, 0.38));
    }
}

@keyframes neonHotGlowFlicker {
    0%,
    16%,
    37%,
    63%,
    100% {
        opacity: 0.36;
        filter:
            sepia(1)
            saturate(17)
            hue-rotate(-18deg)
            brightness(1.18)
            contrast(1.16)
            drop-shadow(0 0 8px rgba(255, 126, 96, 0.82))
            drop-shadow(0 0 18px rgba(226, 34, 24, 0.46))
            drop-shadow(0 0 34px rgba(162, 10, 14, 0.26));
    }

    8% {
        opacity: 0.2;
        filter:
            sepia(1)
            saturate(14)
            hue-rotate(-18deg)
            brightness(0.84)
            contrast(1.04)
            drop-shadow(0 0 5px rgba(255, 108, 88, 0.46))
            drop-shadow(0 0 10px rgba(172, 18, 16, 0.24))
            drop-shadow(0 0 18px rgba(106, 6, 10, 0.14));
    }

    23% {
        opacity: 0.56;
        filter:
            sepia(1)
            saturate(19)
            hue-rotate(-15deg)
            brightness(1.34)
            contrast(1.24)
            drop-shadow(0 0 10px rgba(255, 146, 114, 0.92))
            drop-shadow(0 0 22px rgba(244, 42, 28, 0.56))
            drop-shadow(0 0 40px rgba(190, 14, 16, 0.3));
    }

    48% {
        opacity: 0.16;
        filter:
            sepia(1)
            saturate(11)
            hue-rotate(-18deg)
            brightness(0.62)
            contrast(1.02)
            drop-shadow(0 0 4px rgba(255, 98, 82, 0.32))
            drop-shadow(0 0 8px rgba(128, 12, 10, 0.18))
            drop-shadow(0 0 14px rgba(78, 6, 8, 0.12));
    }

    81% {
        opacity: 0.42;
        filter:
            sepia(1)
            saturate(18)
            hue-rotate(-17deg)
            brightness(1.24)
            contrast(1.18)
            drop-shadow(0 0 9px rgba(255, 138, 110, 0.86))
            drop-shadow(0 0 20px rgba(228, 34, 22, 0.48))
            drop-shadow(0 0 36px rgba(172, 12, 14, 0.28));
    }
}

@keyframes neonBasePulse {
    0%,
    23%,
    47%,
    75%,
    100% {
        opacity: 0.92;
        filter:
            sepia(1)
            saturate(13)
            hue-rotate(-20deg)
            brightness(0.94)
            contrast(1.14)
            drop-shadow(0 0 10px rgba(255, 140, 92, 0.42))
            drop-shadow(0 0 22px rgba(188, 24, 16, 0.3));
    }

    9% {
        opacity: 0.84;
        filter:
            sepia(1)
            saturate(10)
            hue-rotate(-20deg)
            brightness(0.8)
            contrast(1.04)
            drop-shadow(0 0 6px rgba(255, 118, 80, 0.24))
            drop-shadow(0 0 14px rgba(136, 16, 12, 0.16));
    }

    31% {
        opacity: 0.98;
        filter:
            sepia(1)
            saturate(15)
            hue-rotate(-17deg)
            brightness(1.1)
            contrast(1.2)
            drop-shadow(0 0 12px rgba(255, 156, 108, 0.5))
            drop-shadow(0 0 28px rgba(212, 28, 16, 0.34));
    }

    58% {
        opacity: 0.86;
        filter:
            sepia(1)
            saturate(10)
            hue-rotate(-20deg)
            brightness(0.82)
            contrast(1.02)
            drop-shadow(0 0 6px rgba(255, 118, 84, 0.22))
            drop-shadow(0 0 12px rgba(124, 14, 10, 0.14));
    }

    86% {
        opacity: 0.96;
        filter:
            sepia(1)
            saturate(14)
            hue-rotate(-18deg)
            brightness(1.04)
            contrast(1.18)
            drop-shadow(0 0 11px rgba(255, 148, 100, 0.46))
            drop-shadow(0 0 24px rgba(198, 24, 16, 0.32));
    }
}

@keyframes neonSliceFlickerA {
    0%,
    10%,
    35%,
    57%,
    100% {
        opacity: 0.68;
        filter:
            sepia(1)
            saturate(16)
            hue-rotate(-18deg)
            brightness(1.12)
            contrast(1.16);
    }

    6% {
        opacity: 0.42;
        filter:
            sepia(1)
            saturate(11)
            hue-rotate(-18deg)
            brightness(0.78)
            contrast(1.04);
    }

    18% {
        opacity: 0.08;
        filter:
            sepia(1)
            saturate(4)
            hue-rotate(-18deg)
            brightness(0.26)
            contrast(0.92);
    }

    24% {
        opacity: 0.84;
        filter:
            sepia(1)
            saturate(19)
            hue-rotate(-15deg)
            brightness(1.34)
            contrast(1.24);
    }

    48% {
        opacity: 0.54;
        filter:
            sepia(1)
            saturate(13)
            hue-rotate(-18deg)
            brightness(0.92)
            contrast(1.08);
    }

    73% {
        opacity: 0.94;
        filter:
            sepia(1)
            saturate(20)
            hue-rotate(-15deg)
            brightness(1.4)
            contrast(1.24);
    }

    81% {
        opacity: 0.16;
        filter:
            sepia(1)
            saturate(6)
            hue-rotate(-18deg)
            brightness(0.38)
            contrast(0.94);
    }
}

@keyframes neonSliceFlickerB {
    0%,
    14%,
    29%,
    54%,
    100% {
        opacity: 0.64;
        filter:
            sepia(1)
            saturate(15)
            hue-rotate(-18deg)
            brightness(1.1)
            contrast(1.14);
    }

    5% {
        opacity: 0.88;
        filter:
            sepia(1)
            saturate(19)
            hue-rotate(-15deg)
            brightness(1.32)
            contrast(1.22);
    }

    12% {
        opacity: 0.36;
        filter:
            sepia(1)
            saturate(10)
            hue-rotate(-18deg)
            brightness(0.72)
            contrast(1.02);
    }

    27% {
        opacity: 0.06;
        filter:
            sepia(1)
            saturate(3)
            hue-rotate(-18deg)
            brightness(0.24)
            contrast(0.92);
    }

    39% {
        opacity: 0.76;
        filter:
            sepia(1)
            saturate(17)
            hue-rotate(-16deg)
            brightness(1.24)
            contrast(1.18);
    }

    63% {
        opacity: 0.48;
        filter:
            sepia(1)
            saturate(12)
            hue-rotate(-18deg)
            brightness(0.88)
            contrast(1.06);
    }

    79% {
        opacity: 1;
        filter:
            sepia(1)
            saturate(20)
            hue-rotate(-15deg)
            brightness(1.42)
            contrast(1.24);
    }

    90% {
        opacity: 0.24;
        filter:
            sepia(1)
            saturate(7)
            hue-rotate(-18deg)
            brightness(0.46)
            contrast(0.98);
    }
}

@keyframes neonSliceFlickerC {
    0%,
    17%,
    44%,
    69%,
    100% {
        opacity: 0.7;
        filter:
            sepia(1)
            saturate(16)
            hue-rotate(-18deg)
            brightness(1.12)
            contrast(1.16);
    }

    9% {
        opacity: 0.46;
        filter:
            sepia(1)
            saturate(11)
            hue-rotate(-18deg)
            brightness(0.8)
            contrast(1.02);
    }

    22% {
        opacity: 0.9;
        filter:
            sepia(1)
            saturate(19)
            hue-rotate(-15deg)
            brightness(1.36)
            contrast(1.22);
    }

    37% {
        opacity: 0.14;
        filter:
            sepia(1)
            saturate(5)
            hue-rotate(-18deg)
            brightness(0.34)
            contrast(0.94);
    }

    41% {
        opacity: 0.62;
        filter:
            sepia(1)
            saturate(14)
            hue-rotate(-18deg)
            brightness(0.98)
            contrast(1.08);
    }

    58% {
        opacity: 0.04;
        filter:
            sepia(1)
            saturate(3)
            hue-rotate(-18deg)
            brightness(0.18)
            contrast(0.9);
    }

    64% {
        opacity: 0.82;
        filter:
            sepia(1)
            saturate(18)
            hue-rotate(-16deg)
            brightness(1.28)
            contrast(1.2);
    }

    86% {
        opacity: 0.28;
        filter:
            sepia(1)
            saturate(8)
            hue-rotate(-18deg)
            brightness(0.54)
            contrast(0.98);
    }
}

@keyframes neonSliceFlickerD {
    0%,
    12%,
    33%,
    59%,
    100% {
        opacity: 0.66;
        filter:
            sepia(1)
            saturate(16)
            hue-rotate(-18deg)
            brightness(1.1)
            contrast(1.14);
    }

    4% {
        opacity: 0.3;
        filter:
            sepia(1)
            saturate(9)
            hue-rotate(-18deg)
            brightness(0.62)
            contrast(1);
    }

    19% {
        opacity: 0.92;
        filter:
            sepia(1)
            saturate(20)
            hue-rotate(-15deg)
            brightness(1.38)
            contrast(1.24);
    }

    26% {
        opacity: 0.48;
        filter:
            sepia(1)
            saturate(12)
            hue-rotate(-18deg)
            brightness(0.86)
            contrast(1.06);
    }

    47% {
        opacity: 0.1;
        filter:
            sepia(1)
            saturate(4)
            hue-rotate(-18deg)
            brightness(0.28)
            contrast(0.92);
    }

    52% {
        opacity: 0.74;
        filter:
            sepia(1)
            saturate(17)
            hue-rotate(-16deg)
            brightness(1.22)
            contrast(1.18);
    }

    76% {
        opacity: 0.94;
        filter:
            sepia(1)
            saturate(20)
            hue-rotate(-15deg)
            brightness(1.42)
            contrast(1.24);
    }

    89% {
        opacity: 0.2;
        filter:
            sepia(1)
            saturate(6)
            hue-rotate(-18deg)
            brightness(0.4)
            contrast(0.96);
    }
}

@keyframes neonSliceFlickerE {
    0%,
    8%,
    26%,
    48%,
    71%,
    100% {
        opacity: 0.58;
        filter:
            sepia(1)
            saturate(15)
            hue-rotate(-18deg)
            brightness(1.08)
            contrast(1.14);
    }

    4% {
        opacity: 0.8;
        filter:
            sepia(1)
            saturate(18)
            hue-rotate(-16deg)
            brightness(1.3)
            contrast(1.2);
    }

    16% {
        opacity: 0.34;
        filter:
            sepia(1)
            saturate(10)
            hue-rotate(-18deg)
            brightness(0.7)
            contrast(1.02);
    }

    31% {
        opacity: 0.66;
        filter:
            sepia(1)
            saturate(16)
            hue-rotate(-17deg)
            brightness(1.12)
            contrast(1.14);
    }

    43% {
        opacity: 0.12;
        filter:
            sepia(1)
            saturate(4)
            hue-rotate(-18deg)
            brightness(0.24)
            contrast(0.92);
    }

    62% {
        opacity: 0.9;
        filter:
            sepia(1)
            saturate(19)
            hue-rotate(-15deg)
            brightness(1.36)
            contrast(1.22);
    }

    83% {
        opacity: 0.22;
        filter:
            sepia(1)
            saturate(7)
            hue-rotate(-18deg)
            brightness(0.44)
            contrast(0.96);
    }

    92% {
        opacity: 0.5;
        filter:
            sepia(1)
            saturate(12)
            hue-rotate(-18deg)
            brightness(0.86)
            contrast(1.06);
    }
}

@keyframes finaleLogoFlickerOutBase {
    0%,
    4% {
        opacity: 0.9;
        filter:
            sepia(1)
            saturate(13)
            hue-rotate(-20deg)
            brightness(0.92)
            contrast(1.14)
            drop-shadow(0 0 9px rgba(255, 136, 90, 0.36))
            drop-shadow(0 0 18px rgba(180, 22, 16, 0.24));
    }

    10% {
        opacity: 0.62;
        filter:
            sepia(1)
            saturate(8)
            hue-rotate(-20deg)
            brightness(0.58)
            contrast(1);
    }

    17% {
        opacity: 0.82;
        filter:
            sepia(1)
            saturate(12)
            hue-rotate(-18deg)
            brightness(0.96)
            contrast(1.1)
            drop-shadow(0 0 8px rgba(255, 144, 96, 0.32))
            drop-shadow(0 0 16px rgba(188, 24, 16, 0.22));
    }

    28% {
        opacity: 0.24;
        filter:
            sepia(1)
            saturate(4)
            hue-rotate(-18deg)
            brightness(0.24)
            contrast(0.94);
    }

    39% {
        opacity: 0.56;
        filter:
            sepia(1)
            saturate(7)
            hue-rotate(-18deg)
            brightness(0.58)
            contrast(0.98);
    }

    48% {
        opacity: 0.16;
        filter:
            sepia(1)
            saturate(2)
            hue-rotate(-18deg)
            brightness(0.18)
            contrast(0.92);
    }

    63% {
        opacity: 0.34;
        filter:
            sepia(1)
            saturate(4)
            hue-rotate(-18deg)
            brightness(0.34)
            contrast(0.94);
    }

    79% {
        opacity: 0.08;
        filter:
            sepia(1)
            saturate(1)
            hue-rotate(-18deg)
            brightness(0.1)
            contrast(0.88);
    }

    90% {
        opacity: 0.14;
        filter:
            sepia(1)
            saturate(1.2)
            hue-rotate(-18deg)
            brightness(0.14)
            contrast(0.9);
    }

    100% {
        opacity: 0;
        filter:
            sepia(1)
            saturate(0)
            hue-rotate(-18deg)
            brightness(0.03)
            contrast(0.88);
    }
}

@keyframes neonGlowFlickerOut {
    0% {
        opacity: 0.3;
        filter:
            sepia(1)
            saturate(15)
            hue-rotate(-20deg)
            brightness(1.02)
            contrast(1.12)
            drop-shadow(0 0 8px rgba(255, 54, 54, 0.84))
            drop-shadow(0 0 20px rgba(206, 12, 24, 0.42))
            drop-shadow(0 0 36px rgba(108, 0, 18, 0.28));
    }

    9% {
        opacity: 0.16;
        filter:
            sepia(1)
            saturate(10)
            hue-rotate(-20deg)
            brightness(0.56)
            contrast(1)
            drop-shadow(0 0 6px rgba(255, 44, 44, 0.46))
            drop-shadow(0 0 12px rgba(162, 8, 18, 0.24))
            drop-shadow(0 0 22px rgba(76, 0, 12, 0.18));
    }

    17% {
        opacity: 0.24;
        filter:
            sepia(1)
            saturate(14)
            hue-rotate(-19deg)
            brightness(0.92)
            contrast(1.08)
            drop-shadow(0 0 7px rgba(255, 58, 52, 0.68))
            drop-shadow(0 0 16px rgba(184, 10, 20, 0.34))
            drop-shadow(0 0 30px rgba(92, 0, 14, 0.22));
    }

    28% {
        opacity: 0.06;
        filter:
            sepia(1)
            saturate(5)
            hue-rotate(-20deg)
            brightness(0.24)
            contrast(0.94)
            drop-shadow(0 0 4px rgba(255, 32, 36, 0.24))
            drop-shadow(0 0 8px rgba(120, 4, 12, 0.14))
            drop-shadow(0 0 14px rgba(58, 0, 8, 0.1));
    }

    41% {
        opacity: 0.12;
        filter:
            sepia(1)
            saturate(5)
            hue-rotate(-20deg)
            brightness(0.32)
            contrast(0.96)
            drop-shadow(0 0 4px rgba(255, 34, 38, 0.28))
            drop-shadow(0 0 8px rgba(124, 4, 12, 0.16))
            drop-shadow(0 0 16px rgba(62, 0, 10, 0.12));
    }

    56% {
        opacity: 0.03;
        filter:
            sepia(1)
            saturate(2)
            hue-rotate(-20deg)
            brightness(0.1)
            contrast(0.9)
            drop-shadow(0 0 2px rgba(255, 28, 34, 0.14))
            drop-shadow(0 0 4px rgba(88, 0, 10, 0.08))
            drop-shadow(0 0 8px rgba(42, 0, 6, 0.06));
    }

    68% {
        opacity: 0.07;
        filter:
            sepia(1)
            saturate(2)
            hue-rotate(-20deg)
            brightness(0.14)
            contrast(0.9)
            drop-shadow(0 0 2px rgba(255, 28, 34, 0.18))
            drop-shadow(0 0 5px rgba(92, 0, 10, 0.1))
            drop-shadow(0 0 10px rgba(46, 0, 8, 0.08));
    }

    83% {
        opacity: 0.01;
        filter:
            sepia(1)
            saturate(0.5)
            hue-rotate(-20deg)
            brightness(0.06)
            contrast(0.88)
            drop-shadow(0 0 1px rgba(255, 24, 30, 0.08))
            drop-shadow(0 0 2px rgba(68, 0, 8, 0.05))
            drop-shadow(0 0 4px rgba(32, 0, 4, 0.04));
    }

    100% {
        opacity: 0;
        filter:
            sepia(1)
            saturate(0)
            hue-rotate(-20deg)
            brightness(0.04)
            contrast(0.88)
            drop-shadow(0 0 0 rgba(255, 24, 30, 0))
            drop-shadow(0 0 0 rgba(68, 0, 8, 0))
            drop-shadow(0 0 0 rgba(32, 0, 4, 0));
    }
}

@keyframes neonSliceFlickerOutA {
    0% {
        opacity: 0.74;
        filter:
            sepia(1)
            saturate(17)
            hue-rotate(-18deg)
            brightness(1.16)
            contrast(1.16);
    }

    7% {
        opacity: 0.92;
        filter:
            sepia(1)
            saturate(20)
            hue-rotate(-15deg)
            brightness(1.36)
            contrast(1.24);
    }

    15% {
        opacity: 0.22;
        filter:
            sepia(1)
            saturate(5)
            hue-rotate(-18deg)
            brightness(0.28)
            contrast(0.94);
    }

    24% {
        opacity: 0.68;
        filter:
            sepia(1)
            saturate(11)
            hue-rotate(-18deg)
            brightness(0.86)
            contrast(1.04);
    }

    33% {
        opacity: 0.1;
        filter:
            sepia(1)
            saturate(2)
            hue-rotate(-18deg)
            brightness(0.14)
            contrast(0.9);
    }

    46% {
        opacity: 0.32;
        filter:
            sepia(1)
            saturate(4)
            hue-rotate(-18deg)
            brightness(0.3)
            contrast(0.92);
    }

    58% {
        opacity: 0.06;
        filter:
            sepia(1)
            saturate(1)
            hue-rotate(-18deg)
            brightness(0.08)
            contrast(0.88);
    }

    67% {
        opacity: 0.18;
        filter:
            sepia(1)
            saturate(2)
            hue-rotate(-18deg)
            brightness(0.16)
            contrast(0.9);
    }

    74%,
    100% {
        opacity: 0;
        filter:
            sepia(1)
            saturate(0)
            hue-rotate(-18deg)
            brightness(0.04)
            contrast(0.88);
    }
}

@keyframes neonSliceFlickerOutB {
    0% {
        opacity: 0.7;
        filter:
            sepia(1)
            saturate(16)
            hue-rotate(-18deg)
            brightness(1.12)
            contrast(1.14);
    }

    11% {
        opacity: 0.42;
        filter:
            sepia(1)
            saturate(8)
            hue-rotate(-18deg)
            brightness(0.54)
            contrast(0.98);
    }

    18% {
        opacity: 0.86;
        filter:
            sepia(1)
            saturate(19)
            hue-rotate(-15deg)
            brightness(1.3)
            contrast(1.22);
    }

    27% {
        opacity: 0.16;
        filter:
            sepia(1)
            saturate(3)
            hue-rotate(-18deg)
            brightness(0.22)
            contrast(0.92);
    }

    39% {
        opacity: 0.58;
        filter:
            sepia(1)
            saturate(7)
            hue-rotate(-18deg)
            brightness(0.62)
            contrast(0.98);
    }

    51% {
        opacity: 0.08;
        filter:
            sepia(1)
            saturate(1.5)
            hue-rotate(-18deg)
            brightness(0.1)
            contrast(0.9);
    }

    64% {
        opacity: 0.36;
        filter:
            sepia(1)
            saturate(4)
            hue-rotate(-18deg)
            brightness(0.34)
            contrast(0.92);
    }

    78% {
        opacity: 0.04;
        filter:
            sepia(1)
            saturate(0.5)
            hue-rotate(-18deg)
            brightness(0.06)
            contrast(0.88);
    }

    90%,
    100% {
        opacity: 0;
        filter:
            sepia(1)
            saturate(0)
            hue-rotate(-18deg)
            brightness(0.04)
            contrast(0.88);
    }
}

@keyframes neonSliceFlickerOutC {
    0% {
        opacity: 0.72;
        filter:
            sepia(1)
            saturate(16)
            hue-rotate(-18deg)
            brightness(1.14)
            contrast(1.14);
    }

    9% {
        opacity: 0.64;
        filter:
            sepia(1)
            saturate(10)
            hue-rotate(-18deg)
            brightness(0.82)
            contrast(1.02);
    }

    20% {
        opacity: 0.9;
        filter:
            sepia(1)
            saturate(19)
            hue-rotate(-15deg)
            brightness(1.32)
            contrast(1.22);
    }

    32% {
        opacity: 0.26;
        filter:
            sepia(1)
            saturate(4)
            hue-rotate(-18deg)
            brightness(0.28)
            contrast(0.94);
    }

    44% {
        opacity: 0.7;
        filter:
            sepia(1)
            saturate(9)
            hue-rotate(-18deg)
            brightness(0.82)
            contrast(0.98);
    }

    56% {
        opacity: 0.1;
        filter:
            sepia(1)
            saturate(2)
            hue-rotate(-18deg)
            brightness(0.12)
            contrast(0.9);
    }

    69% {
        opacity: 0.42;
        filter:
            sepia(1)
            saturate(5)
            hue-rotate(-18deg)
            brightness(0.38)
            contrast(0.92);
    }

    82% {
        opacity: 0.18;
        filter:
            sepia(1)
            saturate(2)
            hue-rotate(-18deg)
            brightness(0.16)
            contrast(0.9);
    }

    92% {
        opacity: 0.02;
        filter:
            sepia(1)
            saturate(0.5)
            hue-rotate(-18deg)
            brightness(0.05)
            contrast(0.88);
    }

    100% {
        opacity: 0;
        filter:
            sepia(1)
            saturate(0)
            hue-rotate(-18deg)
            brightness(0.04)
            contrast(0.88);
    }
}

@keyframes neonSliceFlickerOutD {
    0% {
        opacity: 0.7;
        filter:
            sepia(1)
            saturate(16)
            hue-rotate(-18deg)
            brightness(1.12)
            contrast(1.14);
    }

    6% {
        opacity: 0.3;
        filter:
            sepia(1)
            saturate(7)
            hue-rotate(-18deg)
            brightness(0.46)
            contrast(0.98);
    }

    14% {
        opacity: 0.82;
        filter:
            sepia(1)
            saturate(18)
            hue-rotate(-15deg)
            brightness(1.26)
            contrast(1.2);
    }

    26% {
        opacity: 0.54;
        filter:
            sepia(1)
            saturate(11)
            hue-rotate(-18deg)
            brightness(0.88)
            contrast(1.04);
    }

    38% {
        opacity: 0.12;
        filter:
            sepia(1)
            saturate(2)
            hue-rotate(-18deg)
            brightness(0.14)
            contrast(0.9);
    }

    52% {
        opacity: 0.66;
        filter:
            sepia(1)
            saturate(8)
            hue-rotate(-18deg)
            brightness(0.74)
            contrast(0.98);
    }

    64% {
        opacity: 0.18;
        filter:
            sepia(1)
            saturate(2)
            hue-rotate(-18deg)
            brightness(0.18)
            contrast(0.9);
    }

    78% {
        opacity: 0.34;
        filter:
            sepia(1)
            saturate(4)
            hue-rotate(-18deg)
            brightness(0.3)
            contrast(0.92);
    }

    89% {
        opacity: 0.06;
        filter:
            sepia(1)
            saturate(1)
            hue-rotate(-18deg)
            brightness(0.08)
            contrast(0.88);
    }

    96% {
        opacity: 0.12;
        filter:
            sepia(1)
            saturate(1.2)
            hue-rotate(-18deg)
            brightness(0.1)
            contrast(0.88);
    }

    100% {
        opacity: 0;
        filter:
            sepia(1)
            saturate(0)
            hue-rotate(-18deg)
            brightness(0.04)
            contrast(0.88);
    }
}

@keyframes neonSliceFlickerOutE {
    0% {
        opacity: 0.62;
        filter:
            sepia(1)
            saturate(15)
            hue-rotate(-18deg)
            brightness(1.08)
            contrast(1.12);
    }

    5% {
        opacity: 0.84;
        filter:
            sepia(1)
            saturate(18)
            hue-rotate(-15deg)
            brightness(1.28)
            contrast(1.18);
    }

    13% {
        opacity: 0.24;
        filter:
            sepia(1)
            saturate(5)
            hue-rotate(-18deg)
            brightness(0.28)
            contrast(0.94);
    }

    22% {
        opacity: 0.58;
        filter:
            sepia(1)
            saturate(9)
            hue-rotate(-18deg)
            brightness(0.72)
            contrast(1);
    }

    35% {
        opacity: 0.08;
        filter:
            sepia(1)
            saturate(2)
            hue-rotate(-18deg)
            brightness(0.12)
            contrast(0.9);
    }

    47% {
        opacity: 0.32;
        filter:
            sepia(1)
            saturate(4)
            hue-rotate(-18deg)
            brightness(0.3)
            contrast(0.92);
    }

    61% {
        opacity: 0.02;
        filter:
            sepia(1)
            saturate(0.5)
            hue-rotate(-18deg)
            brightness(0.04)
            contrast(0.88);
    }

    69% {
        opacity: 0.18;
        filter:
            sepia(1)
            saturate(2)
            hue-rotate(-18deg)
            brightness(0.16)
            contrast(0.9);
    }

    80%,
    100% {
        opacity: 0;
        filter:
            sepia(1)
            saturate(0)
            hue-rotate(-18deg)
            brightness(0.04)
            contrast(0.88);
    }
}

@keyframes scarecrow-crumble-main {
    0% {
        transform: translate(-50%, -50%) scale(var(--object-display-scale, 1)) rotate(0deg);
    }

    4% {
        transform: translate(calc(-50% + 3px), calc(-50% - 2px)) scale(var(--object-scale-103, 1.03)) rotate(-1.4deg);
    }

    8% {
        transform: translate(calc(-50% - 4px), calc(-50% + 3px)) scale(var(--object-scale-104, 1.04)) rotate(1.8deg);
    }

    12% {
        transform: translate(calc(-50% + 5px), calc(-50% - 3px)) scale(var(--object-scale-105, 1.05)) rotate(-2.2deg);
    }

    17% {
        transform: translate(calc(-50% - 3px), calc(-50% + 4px)) scale(var(--object-scale-103, 1.03)) rotate(1.6deg);
    }

    24% {
        transform: translate(calc(-50% + 2px), calc(-50% + 6px)) scale(var(--object-scale-101, 1.01)) rotate(-0.8deg);
    }

    38% {
        transform: translate(calc(-50% + 3px), calc(-50% + 13px)) scale(var(--object-scale-99, 0.99)) rotate(1.2deg);
    }

    56% {
        transform: translate(calc(-50% - 4px), calc(-50% + 24px)) scale(var(--object-scale-95, 0.95)) rotate(-2deg);
    }

    74% {
        transform: translate(calc(-50% + 6px), calc(-50% + 41px)) scale(var(--object-scale-89, 0.89)) rotate(2.8deg);
    }

    88% {
        transform: translate(calc(-50% - 6px), calc(-50% + 58px)) scale(var(--object-scale-82, 0.82)) rotate(-3.2deg);
    }

    100% {
        transform: translate(calc(-50% + 1px), calc(-50% + 78px)) scale(var(--object-scale-74, 0.74)) rotate(-1deg);
    }
}
@keyframes scarecrow-crumble-image {
    0% {
        opacity: 1;
        filter:
            grayscale(0)
            saturate(1)
            brightness(1)
            contrast(1)
            blur(0)
            drop-shadow(0 10px 12px rgba(0, 0, 0, 0.26));
        transform: translate(0, 0) scale(1) rotate(0deg);
    }

    10% {
        opacity: 1;
        filter:
            grayscale(0.02)
            saturate(1.5)
            brightness(1.38)
            contrast(1.34)
            blur(0)
            drop-shadow(0 0 14px rgba(255, 122, 42, 0.82))
            drop-shadow(0 0 30px rgba(160, 20, 10, 0.46))
            drop-shadow(0 10px 12px rgba(0, 0, 0, 0.28));
        transform: translate(1px, -1px) scale(1.01) rotate(-0.3deg);
    }

    22% {
        opacity: 0.96;
        filter:
            grayscale(0.18)
            saturate(0.92)
            brightness(0.94)
            contrast(1.84)
            blur(0.12px)
            drop-shadow(0 0 8px rgba(182, 22, 10, 0.5))
            drop-shadow(0 10px 12px rgba(0, 0, 0, 0.3));
        transform: translate(-2px, 3px) scale(0.998) rotate(0.6deg);
    }

    40% {
        opacity: 0.82;
        filter:
            grayscale(0.62)
            saturate(0.34)
            brightness(0.56)
            contrast(2.3)
            blur(0.45px)
            drop-shadow(0 8px 10px rgba(0, 0, 0, 0.22));
        transform: translate(1px, 9px) scale(0.98) rotate(-0.8deg);
    }

    58% {
        opacity: 0.58;
        filter:
            grayscale(0.9)
            saturate(0.12)
            brightness(0.28)
            contrast(2.8)
            blur(1.2px)
            drop-shadow(0 6px 8px rgba(0, 0, 0, 0.12));
        transform: translate(-2px, 18px) scale(0.94) rotate(1.2deg);
    }

    73% {
        opacity: 0.24;
        filter:
            grayscale(1)
            saturate(0.04)
            brightness(0.14)
            contrast(3.02)
            blur(2.1px)
            drop-shadow(0 2px 3px rgba(0, 0, 0, 0.04));
        transform: translate(2px, 28px) scale(0.89) rotate(-1.6deg);
    }

    82% {
        opacity: 0.38;
        filter:
            grayscale(1)
            saturate(0.03)
            brightness(0.16)
            contrast(3.04)
            blur(2.4px)
            drop-shadow(0 2px 3px rgba(0, 0, 0, 0.02));
        transform: translate(-1px, 36px) scale(0.86) rotate(1.4deg);
    }

    90% {
        opacity: 0.08;
        filter:
            grayscale(1)
            saturate(0)
            brightness(0.08)
            contrast(3.12)
            blur(3.2px)
            drop-shadow(0 0 0 rgba(0, 0, 0, 0));
        transform: translate(1px, 46px) scale(0.82) rotate(-1.2deg);
    }

    96% {
        opacity: 0.16;
        filter:
            grayscale(1)
            saturate(0)
            brightness(0.1)
            contrast(3.14)
            blur(3.6px)
            drop-shadow(0 0 0 rgba(0, 0, 0, 0));
        transform: translate(-1px, 56px) scale(0.8) rotate(0.6deg);
    }

    100% {
        opacity: 0;
        filter:
            grayscale(1)
            saturate(0)
            brightness(0.04)
            contrast(3.2)
            blur(5.4px)
            drop-shadow(0 0 0 rgba(0, 0, 0, 0));
        transform: translate(0, 66px) scale(0.76) rotate(0deg);
    }
}

@keyframes scarecrow-ember-glow {
    0% {
        opacity: 0;
        filter: blur(14px) saturate(1.5) brightness(0.9);
        transform: scale(0.9);
    }

    8% {
        opacity: 0.42;
        filter: blur(16px) saturate(1.9) brightness(1.16);
        transform: scale(0.98);
    }

    16% {
        opacity: 0.92;
        filter: blur(19px) saturate(2.3) brightness(1.52);
        transform: scale(1.06);
    }

    24% {
        opacity: 0.62;
        filter: blur(16px) saturate(1.94) brightness(1.16);
        transform: scale(1.02);
    }

    38% {
        opacity: 0.26;
        filter: blur(13px) saturate(1.42) brightness(0.82);
        transform: scale(1.02) translateY(4px);
    }

    56% {
        opacity: 0.12;
        filter: blur(11px) saturate(1.06) brightness(0.58);
        transform: scale(1.06) translateY(9px);
    }

    100% {
        opacity: 0;
        filter: blur(9px) saturate(0.78) brightness(0.34);
        transform: scale(1.12) translateY(16px);
    }
}

@keyframes scarecrow-charred-collapse {
    0% {
        opacity: 0;
        filter: blur(0.2px) contrast(1.08) saturate(1.04);
        transform: translateX(0) translateY(0) scale(0.94);
    }

    18% {
        opacity: 0.22;
        filter: blur(0.3px) contrast(1.18) saturate(1.08);
        transform: translateX(var(--crumble-fracture-shift-14, 0px)) translateY(3px) scale(0.98);
    }

    34% {
        opacity: 0.48;
        filter: blur(0.46px) contrast(1.28) saturate(1.02);
        transform: translateX(var(--crumble-fracture-shift-32, 0px)) translateY(9px) scale(1);
    }

    52% {
        opacity: 0.72;
        filter: blur(0.6px) contrast(1.42) saturate(0.94);
        transform: translateX(var(--crumble-fracture-shift-48, 0px)) translateY(17px) scale(1.02);
    }

    68% {
        opacity: 0.56;
        filter: blur(0.9px) contrast(1.5) saturate(0.86);
        transform: translateX(var(--crumble-fracture-shift-60, 0px)) translateY(26px) scale(1.03);
    }

    84% {
        opacity: 0.22;
        filter: blur(1.2px) contrast(1.32) saturate(0.72);
        transform: translateX(var(--crumble-fracture-shift-70, 0px)) translateY(38px) scale(1.04);
    }

    100% {
        opacity: 0;
        filter: blur(1.6px) contrast(1.14) saturate(0.6);
        transform: translateX(var(--crumble-fracture-shift-84, 0px)) translateY(56px) scale(1.06);
    }
}

@keyframes scarecrow-ash-breakup {
    0% {
        opacity: 0;
        filter: blur(0.45px) contrast(1.06);
        transform: scale(0.95);
    }

    24% {
        opacity: 0.16;
        filter: blur(0.7px) contrast(1.12);
        transform: translate(-1px, 4px) scale(1);
    }

    42% {
        opacity: 0.42;
        filter: blur(0.9px) contrast(1.24);
        transform: translate(2px, 10px) scale(1.02);
    }

    60% {
        opacity: 0.48;
        filter: blur(1.12px) contrast(1.32);
        transform: translate(-2px, 18px) scale(1.03);
    }

    78% {
        opacity: 0.24;
        filter: blur(1.3px) contrast(1.2);
        transform: translate(2px, 28px) scale(1.05);
    }

    92% {
        opacity: 0.08;
        filter: blur(1.62px) contrast(1.08);
        transform: translate(-1px, 38px) scale(1.08);
    }

    100% {
        opacity: 0;
        filter: blur(2px) contrast(1.02);
        transform: translate(0, 48px) scale(1.1);
    }
}

@keyframes ash-particle-fall {
    0% {
        opacity: 0;
        filter: blur(var(--particle-blur-start, 0px));
        transform:
            translate(-50%, -50%)
            translate(0, 0)
            scale(var(--particle-scale, 1))
            rotate(0deg);
    }

    10% {
        opacity: var(--particle-opacity, 0.4);
    }

    28% {
        opacity: var(--particle-peak-opacity, 0.36);
        transform:
            translate(-50%, -50%)
            translate(var(--particle-early-drift-x, 0px), var(--particle-early-drift-y, 0px))
            scale(var(--particle-early-scale, 0.92))
            rotate(var(--particle-spin-early, 0deg));
    }

    52% {
        opacity: var(--particle-mid-opacity, 0.3);
        transform:
            translate(-50%, -50%)
            translate(var(--particle-mid-drift-x, 0px), var(--particle-mid-drift-y, 0px))
            scale(var(--particle-mid-scale, 0.78))
            rotate(var(--particle-spin-mid, 0deg));
    }

    100% {
        opacity: 0;
        filter: blur(var(--particle-blur-end, 1.4px));
        transform:
            translate(-50%, -50%)
            translate(var(--particle-drift-x, 0px), var(--particle-drift-y, 0px))
            scale(var(--particle-end-scale, 0.5))
            rotate(var(--particle-spin, 0deg));
    }
}

@keyframes ember-particle-rise {
    0% {
        opacity: 0;
        filter: blur(var(--particle-blur-start, 0px)) brightness(0.9);
        transform: translate(-50%, -50%) translate(0, 0) scale(var(--particle-scale, 1)) rotate(0deg);
    }

    10% {
        opacity: var(--particle-opacity, 0.7);
        filter: blur(var(--particle-blur-start, 0px)) brightness(1.18);
    }

    24% {
        opacity: var(--particle-peak-opacity, 0.56);
        filter: blur(calc(var(--particle-blur-start, 0px) + 0.08px)) brightness(1.28);
        transform:
            translate(-50%, -50%)
            translate(var(--particle-early-drift-x, 0px), var(--particle-early-drift-y, -8px))
            scale(var(--particle-early-scale, 0.84))
            rotate(var(--particle-spin-early, 0deg));
    }

    44% {
        opacity: var(--particle-mid-opacity, 0.36);
        filter: blur(calc(var(--particle-blur-start, 0px) + 0.18px)) brightness(1);
        transform:
            translate(-50%, -50%)
            translate(var(--particle-mid-drift-x, 0px), var(--particle-mid-drift-y, -18px))
            scale(var(--particle-mid-scale, 0.68))
            rotate(var(--particle-spin-mid, 0deg));
    }

    100% {
        opacity: 0;
        filter: blur(var(--particle-blur-end, 1px)) brightness(0.78);
        transform:
            translate(-50%, -50%)
            translate(var(--particle-drift-x, 0px), var(--particle-drift-y, -24px))
            scale(var(--particle-end-scale, 0.32))
            rotate(var(--particle-spin, 0deg));
    }
}

#question-modal {
    background: rgba(0, 0, 0, 0.76);
}

.question-card {
    width: 1267px;
    min-height: 432px;
    padding: 52px 70px 56px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    gap: 34px;
    border-radius: 26px;
    background:
        linear-gradient(180deg, rgba(10, 8, 10, 0.96), rgba(20, 12, 14, 0.98));
    border: 3px solid rgba(184, 36, 24, 0.88);
    box-shadow:
        0 20px 70px rgba(0, 0, 0, 0.48),
        0 0 34px rgba(130, 22, 18, 0.25);
}

.question-text {
    width: 100%;
    color: #f05738;
    font-size: 51px;
    line-height: 1.34;
    text-align: center;
    text-shadow:
        0 0 16px rgba(118, 16, 14, 0.48),
        0 3px 10px rgba(0, 0, 0, 0.72);
}

.question-answer-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 22px;
}

.question-answer-input {
    width: 760px;
    max-width: 100%;
    min-height: 86px;
    padding: 18px 26px;
    border: 2px solid rgba(229, 122, 70, 0.85);
    border-radius: 22px;
    background: rgba(12, 8, 9, 0.94);
    color: var(--cream);
    font: inherit;
    font-size: 36px;
    letter-spacing: 0.02em;
    text-align: center;
    box-shadow:
        inset 0 0 0 1px rgba(255, 189, 138, 0.14),
        0 12px 30px rgba(0, 0, 0, 0.24);
}

.question-answer-input:focus {
    outline: none;
    border-color: rgba(255, 162, 109, 0.98);
    box-shadow:
        inset 0 0 0 1px rgba(255, 213, 179, 0.24),
        0 0 0 3px rgba(255, 128, 78, 0.18),
        0 12px 30px rgba(0, 0, 0, 0.24);
}

.question-answer-input::placeholder {
    color: rgba(255, 222, 206, 0.62);
}

.image-overlay {
    background: rgba(0, 0, 0, 0.96);
}

.image-card {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 42px;
    padding: 36px 96px 110px;
}

#modal-image {
    max-width: 850px;
    max-height: 680px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 14px 36px rgba(0, 0, 0, 0.4));
}

.modal-button {
    min-width: 346px;
    min-height: 70px;
    padding: 14px 22px;
    font-size: 31px;
    text-shadow:
        0 2px 6px rgba(0, 0, 0, 0.78),
        0 0 10px rgba(120, 24, 16, 0.46);
    box-shadow:
        0 14px 26px rgba(0, 0, 0, 0.36),
        0 0 26px rgba(130, 24, 18, 0.22);
}
