* {
    box-sizing: border-box;
}

:root {
    --bg: #f8f8f8;
    --card: #ffffff;
    --text: #1f2937;
    --muted: #6b7280;
    --border: #e5e7eb;
}

body {
    margin: 0;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--text);
    -webkit-tap-highlight-color: transparent;
}

.app {
    max-width: 480px;
    margin: auto;
    padding: 20px 16px 40px;
}

h1 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 700;
}

.subtitle {
    margin-top: 6px;
    color: var(--muted);
    font-size: .95rem;
}

.toolbar {
    display: flex;
    gap: 12px;
    margin: 24px 0;
}

button,
select {
    height: 48px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: white;
    font: inherit;
    font-size: .95rem;
}

button {
    flex: 1;
    background: #111827;
    color: white;
    border: none;
    cursor: pointer;
}

button:active {
    transform: scale(.98);
}

select {
    width: 140px;
    padding: 0 12px;
}

#grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px 14px;
}

.card {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.marker {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 2px solid var(--border);
    transition: .2s;
}

.marker.selected {
    transform: scale(1.08);
    border-color: #111827;
}

.marker.locked {
    border: 4px solid #111827;
}

.marker.dim {
    opacity: .18;
    filter: grayscale(.8);
}

label {
    margin-top: 8px;
    font-size: .72rem;
    text-align: center;
    color: var(--muted);
    line-height: 1.2;
}

@media (max-width:420px) {

    .app {
        padding: 16px 12px 30px;
    }

    #grid {
        gap: 18px 10px;
    }

    .marker {
        width: 64px;
        height: 64px;
    }

    label {
        font-size: .68rem;
    }

    .toolbar {
        gap: 8px;
    }

    select {
        width: 120px;
    }
}

.chosen-section {
    margin: 20px 0;
}

.chosen-section h2 {
    margin: 0 0 12px;
    font-size: 1rem;
}

#chosenGrid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 8px;
}
