.cb-root {
    --cb-bg: #1e1e1e;
    --cb-side-bg: #2b2b2b;
    --cb-side-border: #3d3d3d;
    --cb-text: #f5f5f5;
    --cb-text-dim: #a0a0a0;
    --cb-winner-bg: #33403a;
    --cb-winner-text: #7be495;
    --cb-round-title-bg: #2b2b2b;
    --cb-round-title-text: #f5f5f5;
    --cb-highlight: #ee222b;
    --cb-radius: 8px;

    position: relative;
    width: 100%;
    height: 100%;
    background: var(--cb-bg);
    overflow: hidden;
    font-family: inherit;
    font-size: 13px;
    color: var(--cb-text);
    user-select: none;
}

.cb-viewport {
    position: absolute;
    inset: 0;
    overflow: hidden;
    cursor: grab;
    touch-action: none;
}

.cb-viewport.cb-panning {
    cursor: grabbing;
}

.cb-lines {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.cb-nodes-layer {
    position: absolute;
    top: 0;
    left: 0;
    transform-origin: 0 0;
}

/* Cabecera de rondas flotante: fija arriba del viewport (no escala con el zoom),
   pero left/width se recalculan en JS (_positionTitles) para seguir a su columna. */
.cb-round-titles-layer {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 3;
}

.cb-round-title {
    position: absolute;
    top: 10px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(20, 20, 20, 0.6);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--cb-round-title-text);
    border-radius: var(--cb-radius);
    font-weight: 600;
    font-size: 13px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 8px;
}

.cb-match {
    position: absolute;
    display: flex;
    flex-direction: column;
}

.cb-match:focus-visible {
    outline: 2px solid var(--cb-highlight);
    outline-offset: 2px;
    border-radius: var(--cb-radius);
}

.cb-match-top,
.cb-match-bottom {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.92em;
    line-height: 1.15;
    color: var(--cb-text-dim);
    text-align: center;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    padding: 0 4px;
}

.cb-sides {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: var(--cb-side-bg);
    border: 1px solid var(--cb-side-border);
    border-radius: var(--cb-radius);
    padding: 6px;
}

.cb-side {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    border-radius: 4px;
    padding: 0 4px;
    cursor: pointer;
}

.cb-side.cb-winner {
    background: var(--cb-winner-bg);
    color: var(--cb-winner-text);
    font-weight: 600;
}

.cb-side.cb-highlighted {
    outline: 2px solid var(--cb-highlight);
}

.cb-controls {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    z-index: 5;
}

.cb-zoom-slider {
    width: 90px;
    height: 34px;
    margin: 0;
    accent-color: var(--cb-highlight);
    cursor: pointer;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.55));
}

.cb-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    background: rgba(20, 20, 20, 0.75);
    backdrop-filter: blur(2px);
    color: var(--cb-text);
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.55);
}

.cb-btn:hover {
    background: var(--cb-winner-bg);
    border-color: var(--cb-winner-bg);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.65);
}

/* Flechas de salto entre rondas: fijas a los lados del viewport, centradas en vertical. */
.cb-round-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    background: rgba(20, 20, 20, 0.75);
    backdrop-filter: blur(2px);
    color: var(--cb-text);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.55);
    z-index: 4;
}

.cb-round-nav-btn:hover {
    background: var(--cb-winner-bg);
    border-color: var(--cb-winner-bg);
}

.cb-round-nav-prev {
    left: 12px;
}

.cb-round-nav-next {
    right: 12px;
}
