.sk-shell {
    --sk-cell: 40px;
    --sk-wall-a: #78848f;
    --sk-wall-b: #313b45;
    --sk-floor-a: #2f3841;
    --sk-floor-b: #29323a;
    --sk-pad: #21c7d6;
    --sk-crate-a: #f0ab52;
    --sk-crate-b: #b6721f;
    --sk-crate-line: #7a4610;
    max-width: 620px;
    margin: 0 auto;
    padding: 12px 10px 28px;
    color: var(--cg-ink);
    font-family: Inter, Arial, sans-serif;
}

.sk-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.sk-stats,
.sk-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sk-stat {
    min-width: 62px;
    padding: 7px 9px;
    border: 1px solid var(--cg-line);
    border-radius: 9px;
    background: var(--cg-panel);
    box-shadow: 0 6px 16px rgba(30, 37, 40, 0.06);
}

.sk-stat span,
.sk-hud-card span {
    display: block;
    color: var(--cg-muted);
    font-size: 10px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.sk-stat strong,
.sk-hud-card strong {
    display: block;
    margin-top: 2px;
    font-size: 18px;
    line-height: 1;
}

.sk-btn {
    min-height: 40px;
    padding: 9px 14px;
    border: 1px solid var(--cg-line);
    border-radius: 9px;
    background: var(--cg-panel);
    color: var(--cg-ink);
    font: inherit;
    font-size: 0.9rem;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.1s ease, border-color 0.1s ease;
}

.sk-btn:hover {
    border-color: var(--cg-teal);
    transform: translateY(-1px);
}

.sk-btn:active {
    transform: translateY(0);
}

.sk-icon-btn {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.sk-icon-btn svg {
    width: 20px;
    height: 20px;
}

.sk-primary {
    background: var(--cg-green);
    border-color: var(--cg-green);
    color: #fff;
}

.sk-primary:hover {
    border-color: var(--cg-green);
    filter: brightness(1.08);
}

.sk-hud {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 10px;
}

.sk-hud-card {
    padding: 8px 10px;
    border: 1px solid var(--cg-line);
    border-radius: 9px;
    background: var(--cg-panel);
    box-shadow: 0 6px 16px rgba(30, 37, 40, 0.06);
}

.sk-stage {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: clamp(340px, 60vh, 580px);
    padding: 8px;
    border-radius: 16px;
    border: 1px solid #0d141a;
    background:
        radial-gradient(circle at 50% 0%, rgba(90, 120, 145, 0.28), transparent 62%),
        linear-gradient(165deg, #1e2831, #121a22);
    box-shadow: var(--cg-shadow);
    overflow: hidden;
}

.sk-board {
    position: relative;
    touch-action: none;
    border-radius: 8px;
    outline: none;
}

.sk-board:focus-visible {
    box-shadow: 0 0 0 3px rgba(33, 199, 214, 0.7);
}

.sk-t {
    position: absolute;
    top: 0;
    left: 0;
    will-change: transform;
}

.sk-floor {
    background: var(--sk-floor-a);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.035);
}

.sk-floor.sk-alt {
    background: var(--sk-floor-b);
}

.sk-wall {
    background: linear-gradient(180deg, var(--sk-wall-a), var(--sk-wall-b));
    box-shadow:
        inset 0 2px 0 rgba(255, 255, 255, 0.18),
        inset 0 -3px 5px rgba(0, 0, 0, 0.55),
        inset 2px 0 0 rgba(255, 255, 255, 0.05);
}

.sk-goal::after {
    content: '';
    position: absolute;
    inset: 26%;
    border-radius: 50%;
    border: 3px solid var(--sk-pad);
    background: radial-gradient(circle, rgba(33, 199, 214, 0.42), rgba(33, 199, 214, 0.05) 70%);
    box-shadow: 0 0 12px rgba(33, 199, 214, 0.5);
}

.sk-crate,
.sk-player {
    position: absolute;
    top: 0;
    left: 0;
    transition: transform 0.11s ease-out;
    will-change: transform;
}

.sk-crate {
    border-radius: 7px;
    background: linear-gradient(160deg, var(--sk-crate-a), var(--sk-crate-b));
    box-shadow:
        inset 0 0 0 2px var(--sk-crate-line),
        inset 0 3px 0 rgba(255, 255, 255, 0.3),
        0 4px 9px rgba(0, 0, 0, 0.45);
    transition: transform 0.11s ease-out, background 0.15s ease, box-shadow 0.15s ease;
}

.sk-crate::before,
.sk-crate::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 12%;
    width: 76%;
    height: 12%;
    min-height: 3px;
    margin-top: -6%;
    border-radius: 2px;
    background: var(--sk-crate-line);
    opacity: 0.75;
    transform: rotate(38deg);
}

.sk-crate::after {
    transform: rotate(-38deg);
}

.sk-crate.sk-on {
    background: linear-gradient(160deg, #6fe0a0, #2a9d5f);
    box-shadow:
        inset 0 0 0 2px #17693e,
        inset 0 3px 0 rgba(255, 255, 255, 0.35),
        0 0 16px rgba(63, 214, 137, 0.55),
        0 4px 9px rgba(0, 0, 0, 0.4);
}

.sk-crate.sk-on::before,
.sk-crate.sk-on::after {
    background: #17693e;
}

.sk-player {
    border-radius: 50%;
    background: radial-gradient(circle at 34% 28%, #f2fbff, #6fc4ee 45%, #2a7fbe 78%, #14547f);
    box-shadow:
        inset 0 -4px 8px rgba(0, 0, 0, 0.3),
        0 0 14px rgba(110, 200, 240, 0.45),
        0 4px 10px rgba(0, 0, 0, 0.5);
    z-index: 3;
}

.sk-player::before,
.sk-player::after {
    content: '';
    position: absolute;
    top: 36%;
    width: 15%;
    height: 15%;
    min-width: 3px;
    min-height: 3px;
    border-radius: 50%;
    background: #10344c;
}

.sk-player::before {
    left: 27%;
}

.sk-player::after {
    right: 27%;
}

.sk-player[data-dir="l"]::before { left: 20%; }
.sk-player[data-dir="l"]::after { right: 34%; }
.sk-player[data-dir="r"]::before { left: 34%; }
.sk-player[data-dir="r"]::after { right: 20%; }
.sk-player[data-dir="u"]::before,
.sk-player[data-dir="u"]::after { top: 27%; }
.sk-player[data-dir="d"]::before,
.sk-player[data-dir="d"]::after { top: 46%; }

.sk-win {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px;
    background: rgba(12, 18, 24, 0.72);
    animation: sk-fade 0.2s ease;
}

@keyframes sk-fade {
    from { opacity: 0; }
}

.sk-win-card {
    max-width: 340px;
    width: 100%;
    padding: 18px;
    border: 1px solid var(--cg-line);
    border-radius: 14px;
    background: var(--cg-panel);
    box-shadow: var(--cg-shadow);
    text-align: center;
}

.sk-win-kicker {
    display: block;
    color: var(--cg-teal);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.sk-win-card strong {
    display: block;
    margin: 5px 0 3px;
    font-size: 1.3rem;
}

.sk-win-card p {
    margin: 0 0 12px;
    color: var(--cg-muted);
    font-size: 0.88rem;
}

.sk-win-actions {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.sk-status {
    min-height: 22px;
    margin: 11px 2px 10px;
    color: var(--cg-muted);
    font-size: 0.92rem;
    font-weight: 600;
}

.sk-controls {
    display: flex;
    gap: 8px;
}

.sk-is-daily #sk-daily {
    border-color: var(--cg-amber);
    background: #fdf3e2;
    color: #8a5406;
}

.sk-wide {
    flex: 1;
    min-width: 90px;
}

.sk-modal {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(20, 26, 30, 0.6);
}

.sk-modal-card {
    position: relative;
    max-width: 420px;
    width: 100%;
    padding: 20px 22px;
    border-radius: 14px;
    background: var(--cg-panel);
    border: 1px solid var(--cg-line);
    box-shadow: var(--cg-shadow);
}

.sk-modal-wide {
    max-width: 520px;
    max-height: 82vh;
    overflow-y: auto;
}

.sk-modal-card h2 {
    margin: 0 0 10px;
    font-size: 1.15rem;
}

.sk-modal-card p {
    margin: 0 0 10px;
    color: var(--cg-muted);
    font-size: 0.92rem;
    line-height: 1.45;
}

.sk-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--cg-muted);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.sk-close:hover {
    color: var(--cg-ink);
    background: var(--cg-bg);
}

.sk-picker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(56px, 1fr));
    gap: 7px;
}

.sk-pick-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    min-height: 48px;
    padding: 4px;
    border: 1px solid var(--cg-line);
    border-radius: 9px;
    background: var(--cg-panel);
    color: var(--cg-ink);
    font: inherit;
    cursor: pointer;
}

.sk-pick-cell strong {
    font-size: 0.95rem;
}

.sk-pick-cell span {
    color: var(--cg-muted);
    font-size: 0.66rem;
    font-weight: 800;
}

.sk-pick-done {
    border-color: #84b8a6;
    background: #e3f5ed;
    color: #14563f;
}

.sk-pick-daily {
    box-shadow: inset 0 0 0 2px var(--cg-amber);
}

.sk-pick-now {
    border-color: var(--cg-teal);
    box-shadow: 0 0 0 2px rgba(18, 122, 137, 0.35);
}

@media (max-width: 640px) {
    .sk-shell {
        padding: 8px 6px 22px;
    }

    .sk-stat {
        min-width: 52px;
        padding: 6px 7px;
    }

    .sk-stat strong,
    .sk-hud-card strong {
        font-size: 15px;
    }

    .sk-hud {
        gap: 6px;
    }

    .sk-hud-card {
        padding: 7px 8px;
    }

    .sk-stage {
        height: clamp(290px, 48vh, 430px);
        padding: 6px;
        border-radius: 13px;
    }

    .sk-btn {
        padding: 9px 8px;
        font-size: 0.82rem;
    }

    .sk-status {
        font-size: 0.84rem;
    }
}
