.cpb-main {
    margin-top: 1rem;
}

/* ── How-to ──────────────────────────────────────────────────────────────── */
.cpb-how-to {
    border: 1px solid rgba(0, 255, 255, 0.24);
    background: rgba(0, 255, 255, 0.04);
    padding: 1.2rem;
    margin-bottom: 1.2rem;
    border-radius: 2px;
}

.cpb-how-to h3 {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--game-accent);
    margin: 0 0 0.8rem 0;
    font-size: 1rem;
}

.cpb-how-to ul {
    list-style: none;
    padding: 0;
    margin: 0;
    color: var(--game-text);
}

.cpb-how-to li {
    margin: 0.5rem 0;
    padding-left: 1.4rem;
    position: relative;
    line-height: 1.4;
}

.cpb-how-to li::before {
    content: "▪";
    position: absolute;
    left: 0;
    color: var(--game-accent);
}

/* ── Config panel ────────────────────────────────────────────────────────── */
.cpb-config {
    border: 1px solid rgba(0, 255, 255, 0.24);
    background: rgba(0, 255, 255, 0.04);
    padding: 1.2rem;
    margin-bottom: 1.2rem;
    border-radius: 2px;
}

.cpb-config h3 {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--game-accent);
    margin: 0 0 1rem 0;
    font-size: 1rem;
}

.cpb-config-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.9rem;
    flex-wrap: wrap;
}

.cpb-config-row label {
    color: var(--game-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.85rem;
    min-width: 150px;
}

.cpb-config-slider-wrap {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    flex: 1;
    min-width: 200px;
}

.cpb-slider {
    -webkit-appearance: none;
    appearance: none;
    flex: 1;
    height: 4px;
    background: rgba(0, 255, 255, 0.2);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

.cpb-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: var(--game-accent);
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(0, 255, 255, 0.6);
    cursor: pointer;
}

.cpb-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: var(--game-accent);
    border: none;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(0, 255, 255, 0.6);
    cursor: pointer;
}

.cpb-speed-readout {
    display: flex;
    align-items: baseline;
    gap: 0.3rem;
    white-space: nowrap;
    color: var(--game-accent);
    font-size: 0.95rem;
    min-width: 110px;
}

.cpb-speed-unit {
    color: var(--game-muted);
    font-size: 0.78rem;
}

.cpb-config-options {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.cpb-cfg-btn {
    font-family: Consolas, "Courier New", monospace;
    font-size: 0.88rem;
    padding: 0.35rem 0.75rem;
    background: rgba(0, 255, 255, 0.05);
    border: 1px solid rgba(0, 255, 255, 0.35);
    color: var(--game-muted);
    cursor: pointer;
    transition: background 0.12s, color 0.12s, border-color 0.12s;
    border-radius: 2px;
    letter-spacing: 0.05em;
}

.cpb-cfg-btn:hover {
    background: rgba(0, 255, 255, 0.12);
    color: var(--game-accent);
    border-color: rgba(0, 255, 255, 0.6);
}

.cpb-cfg-btn.active {
    background: rgba(0, 255, 255, 0.16);
    border-color: var(--game-accent);
    color: var(--game-accent);
    box-shadow: 0 0 8px rgba(0, 255, 255, 0.2);
}

.cpb-config-note {
    color: var(--game-muted);
    font-size: 0.78rem;
    margin: 0.6rem 0 0;
    opacity: 0.7;
}

/* ── Card ────────────────────────────────────────────────────────────────── */
.cpb-card {
    border: 1px solid rgba(0, 255, 255, 0.28);
    background: rgba(3, 9, 9, 0.9);
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.14);
    padding: 0.8rem;
}

.cpb-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    border: 1px solid rgba(0, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.35);
    padding: 0.65rem 0.8rem;
    flex-wrap: wrap;
}

.cpb-title {
    font-family: "Barlow Condensed", sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 1.8rem;
    color: var(--game-text);
}

.cpb-stats {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.cpb-stats span {
    border: 1px solid rgba(0, 255, 255, 0.32);
    background: rgba(0, 255, 255, 0.05);
    padding: 0.45rem 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--game-muted);
}

.cpb-stats strong {
    color: var(--game-accent);
}

.cpb-instruction {
    margin-top: 0.7rem;
    border: 1px solid rgba(0, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.38);
    padding: 0.55rem;
    color: var(--game-muted);
    text-align: center;
}

/* ── Board ───────────────────────────────────────────────────────────────── */
.cpb-board {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 0.5rem;
}

.cpb-canvas-wrap {
    width: 100%;
    max-width: 420px;
    display: flex;
    justify-content: center;
}

#cpbCanvas {
    width: 100%;
    max-width: 400px;
    height: auto;
    display: block;
}

/* ── Feedback text ───────────────────────────────────────────────────────── */
.cpb-feedback {
    font-family: "Barlow Condensed", sans-serif;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    min-height: 2.5rem;
    text-align: center;
    transition: color 0.15s;
}

.cpb-feedback.perfect { color: #00ffff; }
.cpb-feedback.miss    { color: #ff4040; }

/* ── Action button ───────────────────────────────────────────────────────── */
.cpb-space-btn {
    font-family: "Barlow Condensed", sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 1.4rem;
    font-weight: 700;
    padding: 1rem 3rem;
    background: rgba(0, 255, 255, 0.06);
    border: 2px solid rgba(0, 255, 255, 0.5);
    color: var(--game-accent);
    cursor: pointer;
    transition: background 0.15s, box-shadow 0.15s;
    user-select: none;
}

.cpb-space-btn:hover {
    background: rgba(0, 255, 255, 0.14);
    box-shadow: 0 0 18px rgba(0, 255, 255, 0.22);
}

.cpb-space-btn:active {
    background: rgba(0, 255, 255, 0.22);
    box-shadow: 0 0 28px rgba(0, 255, 255, 0.4);
}

.cpb-space-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}
