#skyfall-mode-game {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: var(--layer-game);
    flex-direction: column;
    overflow: hidden;
    max-width: 100vw;
    max-height: var(--app-height, 100dvh);
    color: var(--ui-text-on-art);
    background: #112b2c;
    isolation: isolate;
    container-type: size;
}
.skyfall-hud {
    z-index: 1;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    align-items: center;
    gap: 6px 8px;
    flex: 0 0 auto;
    min-height: 108px;
    padding: max(12px, env(safe-area-inset-top)) 12px 8px max(10px, env(safe-area-inset-left));
    background: linear-gradient(#172f35, #244b45);
    border-bottom: 2px solid #d3ae69;
    box-shadow: 0 2px 8px #081b20a8;
    text-align: center;
}
.skyfall-hud h2 {
    margin: 0;
    font-size: clamp(17px, 5cqw, 25px);
    font-weight: 800;
    text-align: left;
}
.skyfall-hud .skyfall-status {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr) minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 6px;
}
.skyfall-status > div {
    display: grid;
    gap: 1px;
    min-width: 0;
}
.skyfall-hud small {
    color: #e0ca9d;
    font:
        700 9px system-ui,
        sans-serif;
    letter-spacing: 0.08em;
}
.skyfall-hud strong {
    font:
        800 clamp(11px, 3.4cqw, 17px) system-ui,
        sans-serif;
    white-space: nowrap;
}
.skyfall-hud .skyfall-heart strong {
    color: #ff929a;
    font-size: clamp(11px, 3.4cqw, 17px);
    letter-spacing: -0.08em;
}
#skyfall-exit-btn {
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 0;
    color: #fff4d4;
    background: var(--ui-small-control) center / 100% 100% no-repeat;
    filter: hue-rotate(240deg) saturate(1.6);
    font:
        800 12px/1.2 system-ui,
        sans-serif;
}
.skyfall-field {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    background: transparent;
}
.skyfall-hero {
    position: absolute;
    z-index: 1;
    left: 50%;
    bottom: 1%;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    transform: translateX(-50%);
    border: 2px solid #e9dca6;
    border-radius: 50%;
    color: #fff7b7;
    background: radial-gradient(circle, #7d9aaa, #244957 70%);
    box-shadow:
        0 0 0 4px #d6eaca46,
        0 0 24px #dbf4c6;
    font-size: 30px;
}
.skyfall-word {
    position: absolute;
    z-index: 2;
    width: min(30%, 138px);
    min-height: 38px;
    padding: 4px 6px;
    transform: translate(-50%, -100%);
    border: 2px solid #efcf8c;
    border-radius: 12px;
    color: #142f34;
    background: linear-gradient(#fff7d9, #e6d9b6);
    box-shadow:
        0 3px 0 #6f643a,
        0 6px 15px #071b18a3;
    font:
        800 clamp(11px, 3.1vw, 16px)/1.1 system-ui,
        sans-serif;
    overflow-wrap: anywhere;
    cursor: pointer;
}
.skyfall-word.selected {
    border-color: var(--color-white);
    background: #fded9b;
    box-shadow:
        0 0 0 3px #78eddd,
        0 0 18px #fbeabb;
}
.skyfall-word.skyfall-elite {
    border-color: #ff695c;
    color: #fff5e8;
    background: linear-gradient(160deg, #b52f38, #681d2c);
    box-shadow:
        0 3px 0 #421522,
        0 0 0 2px #ffb06b,
        0 0 20px #e6354c99;
}
.skyfall-word.skyfall-elite::before {
    content: 'ELITE';
    display: block;
    color: #ffd37a;
    font-size: 9px;
    letter-spacing: 0.12em;
}
.skyfall-hit {
    position: absolute;
    z-index: 4;
    transform: translate(-50%, -50%);
    color: #fff8a2;
    font-size: 48px;
    text-shadow:
        0 0 15px var(--color-white),
        0 0 28px #f6a440;
    pointer-events: none;
    animation: skyfall-impact 0.6s ease-out forwards;
}
.skyfall-projectile {
    position: absolute;
    z-index: 3;
    left: 50%;
    top: 91%;
    width: 36px;
    height: 36px;
    transform: translate(-50%, -50%);
    background: url('../../images/theme/parts/combat-basic.webp?v=ec36412ba452') center / contain no-repeat;
    pointer-events: none;
    animation: skyfall-shot 0.36s ease-in forwards;
}
@keyframes skyfall-shot {
    to {
        left: var(--dest-left);
        top: var(--dest-top);
    }
}
@keyframes skyfall-impact {
    from {
        scale: 0.35;
        opacity: 0;
    }
    35% {
        scale: 1.3;
        opacity: 1;
    }
    to {
        scale: 2;
        opacity: 0;
    }
}
.skyfall-damaged {
    animation: skyfall-damage 0.35s ease-out;
}
@keyframes skyfall-damage {
    50% {
        filter: saturate(1.5) sepia(0.6) hue-rotate(310deg);
    }
}
.skyfall-answer-panel {
    z-index: 1;
    flex: 0 0 clamp(140px, 24cqh, 220px);
    height: clamp(140px, 24cqh, 220px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
    padding: 8px 9px max(9px, env(safe-area-inset-bottom));
    border-top: 2px solid #d3ae69;
    background: transparent;
}
.skyfall-item {
    display: block;
    min-width: 132px;
    margin: 0 auto 5px;
    padding: 4px 9px;
    border: 1px solid #d3ae69;
    border-radius: 8px;
    color: #fff4d4;
    background: #315c51;
    font:
        800 11px/1.1 system-ui,
        sans-serif;
}
.skyfall-item small {
    margin-left: 4px;
    color: #f5d99b;
    font-size: 9px;
}
.skyfall-item:disabled {
    opacity: 0.45;
}
#skyfall-prompt {
    margin: 0 0 7px;
    height: 32px;
    flex: 0 0 32px;
    overflow: auto;
    text-align: center;
    text-shadow:
        0 1px 2px #071b14,
        0 0 4px #071b14;
    font:
        800 clamp(11px, 3.1vw, 15px)/1.2 system-ui,
        sans-serif;
}
.skyfall-choices {
    display: grid;
    flex: 1 1 0;
    min-height: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: 5px;
}
.skyfall-choice {
    min-width: 0;
    min-height: 31px;
    padding: 4px 6px;
    border: 1px solid #bfcbd3;
    border-radius: 8px;
    color: #173245;
    background: #e6f0e7;
    font:
        750 clamp(11px, 3vw, 14px)/1.15 system-ui,
        sans-serif;
    overflow-wrap: anywhere;
    overflow: auto;
}
.skyfall-choice:active {
    background: #f9e1a0;
}
.skyfall-selection .mode-description {
    color: #f0e5ca;
}
.skyfall-result {
    text-align: center;
    color: #f8eac8;
    background: linear-gradient(160deg, #23484a, #192e3c) !important;
    border: 2px solid #dfbf79;
}
.skyfall-result-star {
    display: block;
    color: #ffe19a;
    font-size: 52px;
    line-height: 1;
}
.skyfall-result h2 {
    margin: 5px 0 7px;
    color: #fff4cb;
    font-size: 25px;
}
.skyfall-result p {
    margin: 8px 0;
}
.skyfall-result-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 18px 0;
}
.skyfall-result-stats div {
    display: grid;
    gap: 4px;
    padding: 12px;
    border: 1px solid #cbb476;
    border-radius: 10px;
    background: #142c32;
}
.skyfall-result-stats small {
    color: #bfcdd0;
}
.skyfall-result-stats strong {
    color: #ffe6a3;
}
@media (max-height: 500px) {
    .skyfall-answer-panel {
        padding-block: 5px;
    }
    .skyfall-choice {
        min-height: 27px;
    }
}
@media (prefers-reduced-motion: reduce) {
    .skyfall-hit,
    .skyfall-damaged,
    .skyfall-projectile {
        animation-duration: 0.01ms;
    }
}
