.sm-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 1.5rem;
    align-items: start;
    margin-top: 2rem;
}
@media (max-width: 900px) {
    .sm-layout { grid-template-columns: 1fr; }
}

.sm-plot-wrap {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    aspect-ratio: 1 / 1;
    max-width: 720px;
    margin: 0 auto;
    position: relative;
}
.sm-plot {
    display: block;
    width: 100%;
    height: 100%;
    cursor: crosshair;
    user-select: none;
}
.sm-plot rect.bg { fill: rgba(255,255,255,0.02); }
.sm-plot line.divider { stroke: rgba(255,255,255,0.15); stroke-width: 1; stroke-dasharray: 4 4; }
.sm-plot line.axis { stroke: rgba(255,255,255,0.25); stroke-width: 1; }
.sm-plot text.q-label {
    fill: rgba(255,255,255,0.45);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    pointer-events: none;
}
.sm-plot text.axis-label {
    fill: rgba(255,255,255,0.6);
    font-size: 12px;
    font-weight: 500;
    pointer-events: none;
}
.sm-plot circle.point {
    cursor: grab;
    transition: r 0.18s, stroke-width 0.18s;
}
.sm-plot circle.point.selected {
    stroke: #fff;
    stroke-width: 2.5;
}
.sm-plot circle.point:active { cursor: grabbing; }
.sm-plot text.label {
    fill: var(--text);
    font-size: 12px;
    font-weight: 600;
    pointer-events: none;
    paint-order: stroke;
    stroke: rgba(10,10,10,0.85);
    stroke-width: 3;
    stroke-linejoin: round;
}

.sm-help {
    text-align: center;
    margin-top: 0.75rem;
    color: var(--text-muted);
    font-size: 0.78rem;
    font-style: italic;
}

.sm-side {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    position: sticky;
    top: 80px;
}
.sm-side h3 {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.75rem;
}
.sm-add-form {
    display: flex; gap: 0.5rem;
    margin-bottom: 1rem;
}
.sm-input {
    flex: 1;
    padding: 0.5rem 0.8rem;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    color: var(--text);
    font-family: inherit;
    font-size: 0.85rem;
    outline: none;
}
.sm-input:focus { border-color: var(--accent); }
.sm-add-btn {
    padding: 0.5rem 1rem;
    background: var(--accent);
    color: white;
    border: 0;
    border-radius: var(--radius-xs);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--t);
}
.sm-add-btn:hover { background: var(--accent-hover); }

.sm-list {
    list-style: none;
    margin-bottom: 1.25rem;
}
.sm-list-empty {
    color: var(--text-muted);
    font-size: 0.82rem;
    line-height: 1.5;
    padding: 0.5rem 0 1rem;
}
.sm-list-item {
    display: flex; align-items: center; gap: 0.6rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.85rem;
    cursor: pointer;
    transition: padding-left var(--t);
}
.sm-list-item:hover { padding-left: 4px; }
.sm-list-item.selected {
    background: var(--accent-soft);
    padding-left: 8px;
    margin: 0 -8px;
    padding-right: 8px;
    border-radius: var(--radius-xs);
    border-bottom-color: transparent;
}
.sm-dot {
    width: 12px; height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}
.sm-list-name {
    flex: 1;
    background: transparent;
    border: 0;
    color: var(--text);
    outline: none;
    font-family: inherit;
    font-size: 0.85rem;
    padding: 4px 0;
}
.sm-list-name:focus { color: var(--accent); }
.sm-list-q {
    color: var(--text-muted);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.sm-list-x {
    background: transparent;
    border: 0;
    color: var(--text-muted);
    cursor: pointer;
    width: 22px; height: 22px;
    border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    transition: all var(--t);
}
.sm-list-x:hover {
    background: rgba(239,68,68,0.15);
    color: var(--red);
}

.sm-actions { display: flex; flex-direction: column; gap: 0.45rem; }
.sm-action-btn {
    display: flex; align-items: center; gap: 0.5rem;
    padding: 0.55rem 0.9rem;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    color: var(--text);
    font-family: inherit;
    font-size: 0.82rem;
    cursor: pointer;
    transition: all var(--t);
}
.sm-action-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-soft);
}
.sm-action-btn.primary {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    font-weight: 600;
}
.sm-action-btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.sm-action-btn.danger:hover {
    color: var(--red);
    border-color: rgba(239,68,68,0.4);
    background: rgba(239,68,68,0.06);
}
.sm-action-btn svg { width: 14px; height: 14px; flex-shrink: 0; }

.sm-error {
    margin-top: 0.75rem;
    padding: 0.5rem 0.8rem;
    background: rgba(239,68,68,0.1);
    border: 1px solid rgba(239,68,68,0.3);
    border-radius: var(--radius-xs);
    color: var(--red);
    font-size: 0.8rem;
}
