.moves-tree {
    max-height: 300px;
    overflow-y: auto;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    line-height: 1.5;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    background: #f8f9fa;
}

.move-row {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
    padding: 1px 0;
}

.move-num {
    color: #888;
    font-size: 0.85em;
    user-select: none;
    min-width: 1.8em;
    text-align: right;
    flex-shrink: 0;
}

.ply {
    cursor: pointer;
    padding: 1px 4px;
    border-radius: 3px;
    transition: background-color 0.15s;
    white-space: nowrap;
    min-width: 2.5em;
}

.ply:hover {
    background-color: #e2e6ea;
}

.ply-active {
    background-color: #b8d4f0;
    font-weight: 600;
}

.start-ref {
    color: #999;
    font-weight: normal;
    letter-spacing: 1px;
}

.start-ref.ply-active {
    color: #555;
}

.variation {
    margin-left: 2.2em;
    padding-left: 0.5rem;
    border-left: 2px solid #ccc;
    color: #666;
    font-size: 0.92em;
    margin-top: 2px;
    margin-bottom: 2px;
}

.nav-buttons {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.nav-buttons button {
    padding: 0.25rem 1rem;
    font-size: 0.85rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    transition: background-color 0.15s;
}

.nav-buttons button:hover:not(:disabled) {
    background-color: #e9ecef;
}

.nav-buttons button:active:not(:disabled),
.nav-buttons button.keyboard-pressed:not(:disabled) {
    background-color: #d0d4d8;
    transform: scale(0.98);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.nav-buttons button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
