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

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

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

.fc-stat {
    min-width: 60px;
    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);
}

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

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

.fc-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;
}

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

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

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

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

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

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

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

.fc-levelrow {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin: 2px 2px 8px;
    font-size: 0.85rem;
    font-weight: 800;
}

.fc-levelrow #ws-best {
    color: var(--cg-muted);
    font-weight: 700;
}

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

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

.fc-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: ws-rise 0.25s ease;
}

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

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

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

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

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

.fc-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);
}

.fc-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);
}

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

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

.fc-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;
}

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

.ws-shell [hidden] {
    display: none !important;
}

.ws-board {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: center;
    gap: 10px;
    padding: 16px 10px;
    border-radius: 18px;
    background: linear-gradient(135deg, #1c2530, #111820);
    box-shadow: var(--cg-shadow);
}

.ws-tube {
    display: flex;
    flex-direction: column-reverse;
    align-items: stretch;
    gap: 3px;
    min-width: 52px;
    padding: 8px 7px 6px;
    border: 2px solid rgba(255, 255, 255, 0.18);
    border-top: 0;
    border-radius: 0 0 16px 16px;
    background: rgba(255, 255, 255, 0.05);
    cursor: pointer;
}

.ws-tube.is-sel {
    border-color: var(--cg-teal);
    box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.5);
    transform: translateY(-4px);
}

.ws-tube.is-done {
    border-color: rgba(34, 197, 94, 0.7);
}

.ws-ball,
.ws-slot {
    width: 38px;
    height: 30px;
    border-radius: 8px;
}

.ws-ball {
    box-shadow: inset 0 -4px 6px rgba(0, 0, 0, 0.3), inset 0 3px 4px rgba(255, 255, 255, 0.35);
}

.ws-slot {
    background: rgba(255, 255, 255, 0.07);
}

.ws-num {
    margin-top: 4px;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.7rem;
    font-weight: 800;
    text-align: center;
}

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

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

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

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

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

    .ws-ball,
    .ws-slot {
        width: 32px;
        height: 27px;
    }

    .ws-tube {
        min-width: 46px;
    }
}
