.procedure-parameter-widget {
    margin: 1.5rem 0;
    padding: 1.25rem;
    border-radius: 24px;
    background: #f8fafc;
    border: 1px solid #dbe3ee;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.ppw-toolbar,
.ppw-controls {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 1rem;
}

.ppw-toolbar button,
.ppw-controls button {
    border: none;
    border-radius: 999px;
    padding: 0.65rem 1rem;
    background: white;
    color: #334155;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid #cbd5e1;
    transition: all 0.2s ease;
}

.ppw-toolbar button:hover,
.ppw-controls button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.12);
}

.ppw-toolbar button.active,
.ppw-controls button {
    background: #0f172a;
    color: white;
    border-color: #0f172a;
}

.ppw-diagram {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 1rem;
    align-items: stretch;
}

.ppw-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 22px;
    padding: 1rem;
    min-height: 180px;
}

.ppw-card h3 {
    margin-top: 0.25rem;
    margin-bottom: 0.9rem;
}

.ppw-label {
    display: inline-block;
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    background: rgba(91, 95, 168, 0.10);
    color: #4b4f9c;
    font-size: 0.8rem;
    font-weight: 800;
}

.ppw-memory-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin: 0.55rem 0;
    padding: 0.75rem 0.9rem;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.ppw-memory-row strong {
    min-width: 3rem;
    text-align: center;
    border-radius: 14px;
    padding: 0.35rem 0.6rem;
    background: #eff6ff;
    color: #1e3a8a;
    font-size: 1.25rem;
}

.ppw-transfer {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 100px;
}

.ppw-arrow {
    width: 88px;
    height: 88px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-weight: 900;
    color: #4b4f9c;
    background: rgba(91, 95, 168, 0.10);
    border: 2px solid rgba(91, 95, 168, 0.25);
    position: relative;
}

.ppw-arrow::before,
.ppw-arrow::after {
    content: '';
    position: absolute;
    top: 50%;
    height: 3px;
    width: 28px;
    background: rgba(91, 95, 168, 0.45);
}

.ppw-arrow::before { right: 100%; }
.ppw-arrow::after { left: 100%; }

.ppw-code-box {
    margin: 1rem 0;
    border-radius: 18px;
    background: #0f172a;
    color: #e5e7eb;
    padding: 1rem;
    overflow-x: auto;
}

.ppw-code-box pre {
    margin: 0;
}

.ppw-message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 18px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #14532d;
    font-weight: 700;
}

.ppw-card.changed {
    outline: 3px solid rgba(230, 0, 79, 0.25);
    box-shadow: 0 12px 28px rgba(230, 0, 79, 0.08);
}

@media (max-width: 780px) {
    .ppw-diagram {
        grid-template-columns: 1fr;
    }
    .ppw-transfer {
        min-height: 70px;
    }
    .ppw-arrow::before,
    .ppw-arrow::after {
        display: none;
    }
}
