.sling-page {
    max-width: 820px;
    min-height: 686px;
}

.sling-levels {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

.sling-level {
    min-width: 9.5rem;
    text-align: left;
    background: #fff;
    border: 1px solid #7284b7;
    border-radius: 0.5rem;
    padding: 0.25rem 0.85rem;
    color: inherit;
}

.sling-level:hover,
.sling-level:focus-visible {
    box-shadow: 0 0.35rem 0.8rem rgba(58, 81, 116, 0.16);
    outline: none;
}

.sling-top-you {
    background: #eef2f8;
    font-weight: 700;
}

.sling-level.is-locked {
    opacity: 0.55;
    cursor: not-allowed;
    border-color: #c5cdd8;
}

.sling-level-name {
    display: block;
    font-weight: 700;
    color: #3a5174;
}

.sling-level-blurb {
    display: block;
    font-size: 0.8rem;
    color: #6c757d;
}

.sling-hud {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 0.75rem;
}

.sling-lives {
    display: flex;
    gap: 0.3rem;
    font-size: 1.15rem;
}

.sling-lives span {
    opacity: 0.28;
}

.sling-lives span.is-on {
    opacity: 1;
}

.sling-stat {
    font-size: 0.9rem;
    color: #3a5174;
}

.sling-stat-label {
    color: #6c757d;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.sling-target-preview {
    font-weight: 700;
    color: #3a5174;
}

.sling-target-preview span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    min-height: 2rem;
    margin-left: 0.25rem;
    padding: 0 0.4rem;
    background: #ffe082;
    border-radius: 0.4rem;
    box-shadow: 0 0 0 2px #7284b7;
    max-width: 100%;
    white-space: pre;
}

.sling-stage {
    position: relative;
    height: 420px;
    overflow: hidden;
    border-radius: 12px;
    background: linear-gradient(180deg, #7eb6d9 0%, #c9def0 42%, #f3e2c0 78%, #d9b57a 100%);
    box-shadow: inset 0 0 0 1px rgba(58, 81, 116, 0.12);
}

.sling-goliath {
    /* position: absolute; 
    right: 8%;
    bottom: 58px;
    width: 70px;
    height: 210px;
    background:
        radial-gradient(circle at 50% 18px, #5b6570 0 18px, transparent 19px),
        linear-gradient(#5b6570, #5b6570) 22px 38px / 26px 120px no-repeat,
        linear-gradient(#5b6570, #5b6570) 8px 70px / 18px 70px no-repeat,
        linear-gradient(#5b6570, #5b6570) 48px 70px / 18px 90px no-repeat;
        */
    opacity: 0.18;
    pointer-events: none;
}

.sling-letters {
    position: absolute;
    inset: 0 0 72px 0;
    z-index: 2;
}

.sling-letter {
    position: absolute;
    top: 0;
    left: 0;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #fff;
    color: #3a5174;
    font-weight: 700;
    font-size: 1.65rem;
    line-height: 1;
    box-shadow: 0 4px 0 #b7c2d8;
    cursor: pointer;
    user-select: none;
    touch-action: manipulation;
    will-change: transform;
}

.sling-letter.is-word {
    width: auto;
    min-width: 72px;
    height: 44px;
    padding: 0 0.7rem;
    font-size: 1.05rem;
    letter-spacing: 0.02em;
    white-space: pre;
}

.sling-done,
.sling-rest {
    white-space: pre;
}

.sling-done {
    color: #1cc88a;
}

.sling-rest {
    color: inherit;
    opacity: 0.55;
}

.sling-space {
    display: inline-block;
    min-width: 0.45em;
    border-radius: 2px;
}

.sling-space.is-typed {
    color: green;
    background-color: #d4edda;
    box-shadow: inset 0 -2px 0 #1cc88a;
}

.sling-space.is-next {
    background-color: rgba(58, 81, 116, 0.12);
    box-shadow: inset 0 -2px 0 rgba(58, 81, 116, 0.35);
    opacity: 1;
}

.sling-letter.is-target {
    background: #ffe082;
    box-shadow: 0 0 0 3px #7284b7, 0 4px 0 #c9a227;
    animation: sling-pulse 0.85s ease-in-out infinite;
    z-index: 1;
}

.sling-letter.is-blast {
    animation: sling-blast 0.32s ease-out forwards;
    pointer-events: none;
}

.sling-letter.is-drop {
    animation: sling-drop 0.28s ease-in forwards;
    pointer-events: none;
}

.sling-stone {
    position: absolute;
    width: 12px;
    height: 12px;
    margin-left: -6px;
    margin-top: -6px;
    border-radius: 50%;
    background: #6d4c41;
    box-shadow: 1px 1px 0 #4e342e;
    opacity: 0;
    z-index: 5;
    pointer-events: none;
}

.sling-ground {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 72px;
    background: linear-gradient(180deg, #c9a36a 0%, #a67c4a 100%);
    box-shadow: inset 0 8px 12px rgba(90, 60, 20, 0.15);
}

.sling-david {
    position: absolute;
    left: 50%;
    bottom: 10px;
    width: 64px;
    height: 86px;
    margin-left: -32px;
    z-index: 4;
}

.sling-david.is-shake {
    animation: sling-shake 0.28s ease-in-out;
}

.sling-david-head {
    position: absolute;
    left: 50%;
    top: 0;
    width: 22px;
    height: 22px;
    margin-left: -11px;
    background: #e8c39e;
    border-radius: 50%;
    box-shadow: inset 0 -2px 0 #d4a574;
}

.sling-david-body {
    position: absolute;
    left: 50%;
    top: 20px;
    width: 28px;
    height: 58px;
    margin-left: -14px;
    background: #3a5174;
    border-radius: 12px 12px 6px 6px;
}

.sling-david-arm {
    position: absolute;
    left: 36px;
    top: 28px;
    width: 34px;
    height: 8px;
    background: #e8c39e;
    border-radius: 4px;
    transform-origin: 4px 50%;
}

.sling-david.is-idle .sling-david-arm {
    animation: sling-sway 1.8s ease-in-out infinite;
}

.sling-david.is-pull .sling-david-arm {
    transform: rotate(-48deg);
}

.sling-david.is-fire .sling-david-arm {
    transform: rotate(28deg);
}

.sling-david-cord {
    position: absolute;
    right: -8px;
    top: -16px;
    width: 18px;
    height: 18px;
    border: 2px solid #5c4033;
    border-radius: 50%;
    border-left-color: transparent;
    border-bottom-color: transparent;
}

.sling-pouch {
    position: absolute;
    right: -12px;
    top: -18px;
    width: 10px;
    height: 10px;
    background: #8d6e63;
    border-radius: 50%;
}

.sling-over {
    position: absolute;
    inset: 0;
    z-index: 8;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(244, 247, 251, 0.88);
    padding: 1rem;
}

.sling-over-card {
    background: #fff;
    border-radius: 12px;
    padding: 1.25rem 1.4rem;
    box-shadow: 0 0.5rem 1.4rem rgba(58, 81, 116, 0.18);
    max-width: 22rem;
    width: 100%;
}

.sling-over-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem 0.75rem;
    font-size: 0.9rem;
}

.sling-over-stats span {
    color: #6c757d;
}

.sling-over-stats strong {
    color: #3a5174;
}

@keyframes sling-sway {
    0%, 100% { transform: rotate(-12deg); }
    50% { transform: rotate(10deg); }
}

@keyframes sling-pulse {
    0%, 100% { box-shadow: 0 0 0 3px #7284b7, 0 4px 0 #c9a227; }
    50% { box-shadow: 0 0 0 6px rgba(114, 132, 183, 0.95), 0 4px 0 #c9a227; }
}

@keyframes sling-blast {
    0% { transform: translate(var(--x, 0), var(--y, 0)) scale(1); opacity: 1; }
    100% { transform: translate(var(--x, 0), var(--y, 0)) scale(1.5); opacity: 0; }
}

@keyframes sling-drop {
    0% { transform: translate(var(--x, 0), var(--y, 0)) scale(1); opacity: 1; }
    100% { transform: translate(var(--x, 0), calc(var(--y, 0px) + 18px)) scale(0.7); opacity: 0; }
}

@keyframes sling-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}

@media (max-width: 576px) {
    .sling-stage {
        height: 360px;
    }

    .sling-letter {
        width: 44px;
        height: 44px;
        font-size: 1.35rem;
    }

    .sling-letter.is-word {
        width: auto;
        height: 40px;
        font-size: 0.95rem;
    }

    .sling-goliath {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sling-david.is-idle .sling-david-arm,
    .sling-letter.is-target {
        animation: none;
    }
}
