.similar-pitchers-widget {
    width: 100%;
    max-width: 1200px;
    margin: 4px auto 1.5em;
    padding: 0 4px;
    box-sizing: border-box;
}

.sp-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #888;
    margin-bottom: 6px;
    text-align: center;
}

.sp-loading {
    font-style: italic;
    color: #666;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 400;
    text-align: center;
}

.sp-sub {
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    color: #666;
    font-size: 10px;
}

.sp-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: center;
}

.sp-card {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 6px 12px 6px 6px;
    transition: background 0.15s, border-color 0.15s, transform 0.15s;
    cursor: pointer;
}

.sp-card:hover {
    background: rgba(255,255,255,0.10);
    border-color: rgba(212,175,37,0.35);
    transform: translateY(-1px);
}

.sp-card:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

.sp-headshot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: rgba(255,255,255,0.06);
}

.sp-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sp-name {
    font-size: 11px;
    color: #ccc;
    white-space: nowrap;
}

.sp-year {
    font-size: 10px;
    color: #888;
    white-space: nowrap;
}

/* ── Similar Pitchers Modal ── */

.sp-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.72);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.sp-modal-overlay.sp-modal-open {
    opacity: 1;
    pointer-events: auto;
}

.sp-modal-panel {
    background: #1a1a1a;
    border: 1px solid rgba(212,175,37,0.25);
    border-radius: 16px;
    padding: 28px;
    width: min(640px, 96vw);
    max-height: 92vh;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    box-shadow: 0 24px 64px rgba(0,0,0,0.6);
    transform: translateY(16px) scale(0.97);
    transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.22s ease;
    opacity: 0;
}

.sp-modal-overlay.sp-modal-open .sp-modal-panel {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.sp-modal-close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: none;
    border: none;
    color: #666;
    font-size: 18px;
    cursor: pointer;
    line-height: 1;
    padding: 4px 6px;
    border-radius: 6px;
    transition: color 0.15s, background 0.15s;
}

.sp-modal-close:hover {
    color: #ccc;
    background: rgba(255,255,255,0.08);
}

.sp-modal-loading {
    text-align: center;
    color: #666;
    font-size: 13px;
    padding: 40px 0;
    font-style: italic;
}

/* Header — headshot + name */
.sp-modal-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
}

.sp-modal-headshot {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    background: rgba(255,255,255,0.06);
    flex-shrink: 0;
    border: 2px solid rgba(212,175,37,0.2);
}

.sp-modal-title-block {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sp-modal-name {
    font-size: 22px;
    font-weight: 700;
    color: #f0f0f0;
    letter-spacing: 0.01em;
}

.sp-modal-year {
    font-size: 13px;
    color: #888;
    font-weight: 400;
}

/* Movement plot — full width, centered */
.sp-modal-plot-wrap {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 4px;
}

.sp-modal-plot-wrap canvas {
    max-width: 100%;
    border-radius: 8px;
    background: #0a0a0a;
}

/* Modal footer actions */
.sp-modal-footer {
    display: flex;
    gap: 10px;
    margin-top: 22px;
    justify-content: flex-end;
}

.sp-modal-btn {
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: background 0.15s, transform 0.1s;
}

.sp-modal-btn:active {
    transform: scale(0.97);
}

.sp-modal-btn-primary {
    background: #BDB5A0;
    color: #111;
}

.sp-modal-btn-primary:hover {
    background: #CAC2AC;
}

.sp-modal-btn-secondary {
    background: rgba(255,255,255,0.08);
    color: #ccc;
    border: 1px solid rgba(255,255,255,0.12);
}

.sp-modal-btn-secondary:hover {
    background: rgba(255,255,255,0.14);
    color: #fff;
}

/* Scope clean-title lines inside modal to not overflow */
.sp-modal-body .clean-title::before,
.sp-modal-body .clean-title::after {
    width: 80px;
}

/* Responsive — shrink canvas on small screens */
@media (max-width: 540px) {
    .sp-modal-plot-wrap canvas {
        width: 100% !important;
        height: auto !important;
    }
}
