.sc-shell {
    max-width: 980px;
    margin: 0 auto;
    padding: 12px 10px 28px;
    color: var(--cg-ink);
    font-family: Inter, Arial, sans-serif;
}

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

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

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

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

.sc-stat strong,
.sc-hud-card strong {
    display: block;
    margin-top: 2px;
    font-size: 17px;
    line-height: 1.05;
}

.sc-btn {
    min-height: 44px;
    padding: 10px 15px;
    border: 1px solid var(--cg-line);
    border-radius: 8px;
    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;
}

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

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

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

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

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

.sc-wide {
    flex: 1;
}

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

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

.sc-timerbar {
    height: 8px;
    margin-bottom: 12px;
    border-radius: 99px;
    background: #dfe4de;
    overflow: hidden;
}

.sc-timerbar span {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--cg-green), var(--cg-teal));
    transition: width 0.4s linear, background 0.3s ease;
}

.sc-timerbar span.sc-low {
    background: linear-gradient(90deg, var(--cg-amber), var(--cg-red));
}

.sc-board {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    min-height: 240px;
    padding: 26px 16px;
    border: 1px solid #2b3a44;
    border-radius: 16px;
    background: radial-gradient(circle at 50% 12%, #33454f, #1c2830 62%, #16202a);
    box-shadow: var(--cg-shadow);
}

.sc-board.sc-good {
    animation: sc-good 0.4s ease;
}

.sc-board.sc-bad {
    animation: sc-bad 0.34s ease;
}

@keyframes sc-good {
    50% { box-shadow: 0 0 0 4px rgba(29, 127, 98, 0.55), var(--cg-shadow); }
}

@keyframes sc-bad {
    20% { transform: translateX(-7px); }
    45% { transform: translateX(6px); }
    70% { transform: translateX(-3px); }
}

.sc-multi {
    position: absolute;
    top: 12px;
    right: 14px;
    padding: 5px 11px;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.1);
    color: #cfe4e1;
    font-size: 0.8rem;
    font-weight: 900;
    letter-spacing: 0.05em;
}

.sc-multi-hot {
    background: var(--cg-amber);
    color: #1b1305;
}

.sc-tiles {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.sc-tile {
    display: flex;
    align-items: center;
    justify-content: center;
    width: clamp(40px, 11vw, 76px);
    height: clamp(48px, 13vw, 92px);
    border-radius: 12px;
    background: linear-gradient(165deg, #fffdf4, #ece3cd);
    border: 1px solid #d6cbb2;
    box-shadow: 0 5px 0 rgba(0, 0, 0, 0.28), inset 0 -3px 6px rgba(150, 130, 90, 0.22);
    color: #1d262c;
    font-size: clamp(24px, 7vw, 48px);
    font-weight: 900;
    line-height: 1;
    animation: sc-drop 0.3s ease backwards;
}

@keyframes sc-drop {
    from { opacity: 0; transform: translateY(-16px) rotate(-6deg); }
}

.sc-hint {
    margin: 0;
    color: #9fb4b8;
    font-size: 0.92rem;
    font-weight: 700;
    text-align: center;
}

.sc-entry {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.sc-input {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 52px;
    padding: 10px 16px;
    border: 2px solid var(--cg-line);
    border-radius: 10px;
    background: var(--cg-panel);
    color: var(--cg-ink);
    font: inherit;
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sc-input:focus {
    outline: none;
    border-color: var(--cg-teal);
    box-shadow: 0 0 0 3px rgba(18, 122, 137, 0.16);
}

.sc-input:disabled {
    background: #eef0ec;
    color: var(--cg-muted);
}

.sc-entry .sc-btn {
    flex: 0 0 auto;
    min-height: 52px;
}

.sc-status {
    min-height: 22px;
    margin: 10px 2px;
    color: var(--cg-muted);
    font-size: 0.95rem;
    font-weight: 700;
}

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

.sc-result {
    margin-top: 12px;
    padding: 16px;
    border: 1px solid var(--cg-line);
    border-radius: 12px;
    background: var(--cg-panel);
    box-shadow: var(--cg-shadow);
    text-align: center;
    animation: sc-rise 0.25s ease;
}

@keyframes sc-rise {
    from { opacity: 0; transform: translateY(8px); }
}

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

.sc-result strong {
    display: block;
    margin: 4px 0 2px;
    font-size: 1.3rem;
}

.sc-result p {
    margin: 0 0 12px;
    color: var(--cg-muted);
    font-size: 0.9rem;
}

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

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

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

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

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

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

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

@media (min-width: 820px) {
    .sc-board {
        min-height: 348px;
        padding: 38px 24px;
        gap: 22px;
    }

    .sc-tiles {
        gap: 11px;
    }

    .sc-tile {
        width: 86px;
        height: 106px;
        font-size: 56px;
        border-radius: 14px;
    }

    .sc-hint {
        font-size: 1rem;
    }
}

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

    .sc-stat {
        min-width: 54px;
        padding: 6px 8px;
    }

    .sc-stat strong {
        font-size: 15px;
    }

    .sc-board {
        min-height: 210px;
        padding: 22px 10px;
        border-radius: 12px;
    }

    .sc-tiles {
        gap: 6px;
    }

    .sc-btn {
        padding: 10px 12px;
        font-size: 0.85rem;
    }

    .sc-input {
        flex: 1 1 100%;
        font-size: 1.15rem;
    }

    .sc-entry .sc-btn {
        flex: 1 1 0;
    }
}
