#mode-toggles {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 0.25rem 0;
}

#sub-count-filter {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 0.25rem auto 0;
    padding: 6px 14px;
    background: #f4f3f9;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    width: fit-content;
}

.filter-label {
    font-size: 0.8rem;
    color: #495057;
    font-weight: 500;
}

.sub-count-btn {
    width: 30px;
    height: 30px;
    border: 1.5px solid #c5c0e0;
    border-radius: 6px;
    background: #fff;
    color: #6c757d;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    transition: all 0.15s;
}

.sub-count-btn:hover {
    border-color: #362A8D;
    color: #362A8D;
    background: #fff;
}

.sub-count-btn.active {
    background: #362A8D;
    border-color: #362A8D;
    color: white;
}

#problem-prompt {
    text-align: center;
    font-size: 1.1rem;
    margin: 1rem 0;
    color: #495057;
    font-weight: 500;
}

#chairs-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin: 1rem auto;
    flex-wrap: wrap;
}

.chair-panel {
    text-align: center;
}

.chair-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #6c757d;
    margin-bottom: 4px;
}

#chair-start, #chair-flipped {
    width: 280px;
    height: 230px;
}

.flip-arrow {
    font-size: 2rem;
    color: #6c757d;
    padding: 0 4px;
}

/* Chair SVG elements */
.chair-bond {
    stroke: #333;
    stroke-width: 2;
    fill: none;
}

.chair-sub-bond {
    stroke: #333;
    stroke-width: 1.5;
}

.chair-label-text {
    font-family: 'Georgia', serif;
    font-size: 17px;
    dominant-baseline: central;
    fill: #333;
}

.chair-label-text.carbon-num {
    font-size: 12px;
    fill: #999;
    text-anchor: middle;
}

.drop-target .chair-label-text {
    text-anchor: middle;
}

.chair-label-text.h-label {
    fill: #aaa;
}

/* Drop targets on flipped chair */
.drop-target {
    cursor: pointer;
}

.drop-target rect {
    fill: transparent;
    stroke: #dee2e6;
    stroke-width: 1.5;
    stroke-dasharray: 4 2;
    rx: 4;
}

.drop-target.hover rect {
    stroke: #6153cc;
    stroke-width: 2;
    fill: #f0eeff;
}

.drop-target.filled rect {
    stroke: #6153cc;
    fill: #f0eeff;
    stroke-dasharray: none;
}

.drop-target.correct rect {
    stroke: #28a745;
    fill: #d4edda;
}

.drop-target.incorrect rect {
    stroke: #dc3545;
    fill: #f8d7da;
}

/* Tile tray */
#tile-tray {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin: 1rem auto;
    max-width: 500px;
    padding: 10px 14px;
    background: #f4f3f9;
    border: 1px solid #dee2e6;
    border-radius: 8px;
}

.sub-tile {
    padding: 10px 18px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    background: white;
    cursor: grab;
    font-family: 'Georgia', serif;
    font-size: 1.15rem;
    user-select: none;
    touch-action: none;
    transition: all 0.15s;
}

.sub-tile.h-tile {
    color: #aaa;
    border-color: #e8e8e8;
}

.sub-tile:hover {
    border-color: #6153cc;
    background: #f0eeff;
}

.sub-tile.placed {
    opacity: 0.4;
    cursor: default;
}

.sub-tile.dragging {
    position: fixed;
    z-index: 1000;
    opacity: 0.85;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

#primary-controls {
    display: flex;
    justify-content: center;
    gap: 8px;
    align-items: center;
}

@media (max-width: 600px) {
    #chairs-container {
        flex-direction: column;
    }
    .flip-arrow {
        transform: rotate(90deg);
    }
}
