.game-shell {
    max-width: 760px;
    margin: auto;
}

.game-heading {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    align-items: end;
    margin-bottom: 20px;
}

.game-heading h1 {
    margin: 4px 0;
    font-size: 36px;
}

.game-heading p {
    color: var(--muted);
    margin: 0;
}

.game-progress {
    color: var(--accent-light);
    font-weight: 700;
    white-space: nowrap;
}

.sort-card {
    padding: 20px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 18px;
}

.question {
    text-align: center;
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 20px;
}

.objects {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 22px;
}

.object {
    min-height: 92px;
    border: 2px solid var(--border);
    background: #101728;
    border-radius: 14px;
    cursor: pointer;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    transition:
        transform .15s ease,
        border-color .15s ease,
        background .15s ease,
        opacity .15s ease;
}

.object:hover:not(:disabled) {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.object.selected {
    border-color: var(--accent-light);
    background: rgba(196, 154, 104, .15);
    transform: translateY(-3px);
}

/*
 * Object has already been placed into a squad.
 * Make it visibly unavailable without making it disappear.
 */
.object.assigned {
    opacity: .38;
    filter: grayscale(.8);
    border-color: #3a4254;
    background: #0c111d;
    cursor: default;
    transform: none;
}

.object.assigned:hover {
    border-color: #3a4254;
    transform: none;
}

.object.correct {
    border-color: var(--good);
    background: rgba(85, 197, 138, .15);
    opacity: 1;
    filter: none;
}

.object.wrong {
    border-color: #c54747;
    background: rgba(197, 71, 71, .12);
    opacity: 1;
    filter: none;
}

.object:disabled {
    cursor: default;
}

.object-emoji {
    font-size: 44px;
    line-height: 1;
}

.object-name {
    color: var(--muted);
    font-size: 11px;
    margin-top: 5px;
}

/* Keep squads neutral until an object is placed inside them. */
.squads {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.squad {
    min-height: 130px;
    padding: 14px;

    border: 2px dashed var(--border);
    background: #101728;
    border-radius: 15px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    cursor: pointer;

    transition:
        border-color .15s ease,
        background .15s ease;
}

.squad:hover {
    border-color: var(--accent);
}

.squad-title {
    font-weight: 800;
    color: var(--accent-light);
    margin-bottom: 10px;
}

.squad-items {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
    min-height: 42px;
}

.squad-emoji {
    font-size: 32px;
}

.feedback {
    min-height: 48px;

    display: flex;
    align-items: center;
    justify-content: center;

    text-align: center;
    margin-top: 16px;

    font-weight: 700;
    line-height: 1.45;
}

.feedback.good {
    color: var(--good);
}

.feedback.try {
    color: var(--accent-light);
}

.game-actions {
    display: flex;
    justify-content: center;
    gap: 9px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.game-button,
.secondary-button {
    min-height: 46px;
    padding: 10px 17px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
}

.game-button {
    background: var(--accent);
    border: 1px solid var(--accent);
    color: #111827;
}

.game-button:disabled {
    opacity: .4;
    cursor: default;
}

.secondary-button {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
}

@media (max-width: 600px) {

    .game-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .sort-card {
        padding: 14px;
    }

    .question {
        font-size: 18px;
    }

    .objects {
        grid-template-columns: repeat(2, 1fr);
    }

    .object {
        min-height: 105px;
    }

    .object-emoji {
        font-size: 48px;
    }

    .squads {
        grid-template-columns: 1fr;
    }
}
