.selection-path-widget {
    margin: 1.5rem 0;
    padding: 1.2rem;
    border-radius: 24px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
}

.spw-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 1rem;
}

.spw-tab {
    border: 1px solid #cbd5e1;
    background: white;
    color: #334155;
    border-radius: 999px;
    padding: 0.55rem 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.spw-tab.active,
.spw-tab:hover {
    background: #0f172a;
    color: white;
    border-color: #0f172a;
}

.spw-input-panel {
    margin: 1rem 0;
    padding: 1rem;
    border-radius: 18px;
    background: white;
    border: 1px solid #e2e8f0;
}

.spw-input-panel label {
    display: block;
    font-weight: 800;
    color: #334155;
    margin-bottom: 0.5rem;
}

.spw-input-panel input,
.spw-input-panel select {
    width: min(360px, 100%);
    padding: 0.65rem 0.8rem;
    border-radius: 14px;
    border: 1px solid #cbd5e1;
    font: inherit;
}

.spw-help {
    margin-bottom: 0;
    color: #64748b;
    font-size: 0.95rem;
}

.spw-layout {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 1rem;
    align-items: stretch;
}

.spw-code-card,
.spw-result-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 1rem;
}

.spw-code-card {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    color: #334155;
    overflow-x: auto;
}

.spw-line {
    padding: 0.45rem 0.6rem;
    border-radius: 12px;
    margin: 0.2rem 0;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.spw-indent {
    margin-left: 1.2rem;
}

.spw-line.active {
    background: #dcfce7;
    color: #14532d;
    font-weight: 900;
    transform: translateX(4px);
}

.spw-line.checked {
    background: #eff6ff;
    color: #1e3a8a;
}

.spw-result-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.6rem;
}

.spw-label {
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.spw-result-card strong {
    color: #0f172a;
    font-size: 1.25rem;
}

.spw-result-card p {
    margin: 0;
    color: #475569;
}

.spw-output {
    margin-top: 0.5rem;
    padding: 0.8rem;
    border-radius: 16px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #14532d;
    font-weight: 700;
}

@media (max-width: 780px) {
    .spw-layout {
        grid-template-columns: 1fr;
    }
}
