
.sx-mlegend { position: absolute; right: 14px; bottom: 30px; z-index: 2; width: 280px; box-sizing: border-box; border-radius: 12px; padding: 4px; font: 500 12.5px/1 var(--font, inherit); font-variant-numeric: tabular-nums; color: var(--sx-ink); }
.sx-mlegend[hidden] { display: none; }
.sx-mt-sec + .sx-mt-sec { margin-top: 4px; padding-top: 4px; border-top: 1px solid var(--sx-line); }
.sx-mlegend .sx-lg-h { height: 28px; padding: 0 0 0 8px; }
.sx-mt-t { font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1; }
.sx-mlegend .sx-lg-n { margin-left: auto; }
.sx-mt-x { all: unset; cursor: pointer; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 6px; color: var(--sx-ink3); flex: none; transition: background-color var(--sx-fast) var(--sx-ease); }
.sx-mt-x:hover { background: var(--sx-wash); color: var(--sx-ink); }
.sx-mt-x .i { width: 13px; height: 13px; stroke: currentColor; stroke-width: 2; fill: none; }
.sx-mt-x:focus-visible, .sx-mt-seg button:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.sx-mt-seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; margin: 2px 4px 4px; padding: 2px; border-radius: 8px; background: var(--sx-wash); }
.sx-mt-seg button { all: unset; cursor: pointer; height: 24px; text-align: center; border-radius: 6px; font: 500 12px/24px var(--font, inherit); color: var(--sx-ink2); }
.sx-mt-seg button:hover { color: var(--sx-ink); }
.sx-mt-seg button[aria-pressed="true"] { background: var(--card-bg, #fff); color: var(--sx-ink); box-shadow: 0 1px 2px rgba(15,20,25,.12), 0 0 0 .5px rgba(15,20,25,.08); }
.sx-mt-note { margin: 2px 8px 6px; font: 400 12px/1.4 var(--font, inherit); color: var(--sx-ink2); }
.sx-mlegend .sx-lg-row.off .sx-lg-t { opacity: .45; }

.sx-mlegend.top { right: auto; bottom: auto; left: 12px; width: auto; max-width: calc(100% - 84px); }
.sx-mlegend.top .sx-lg-rows, .sx-mlegend.top .sx-mt-note, .sx-mlegend.top .sx-mt-seg { display: none; }

.sx-mt-tip b { font-weight: 600; }
.sx-mt-tip small { display: block; margin-top: 2px; }

.sx-mt-panel { grid-column: 1 / -1; display: grid; gap: 4px; }
.sx-mt-panel[hidden] { display: none; }
.sx-mt-sets { display: flex; flex-wrap: wrap; gap: 6px; padding: 2px 8px 4px; }
.sx-mt-set { display: inline-flex; align-items: center; height: 30px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--sx-line2); background: #fff; }
.sx-mt-set > button { all: unset; cursor: pointer; height: 30px; padding: 0 4px 0 12px; font: 500 13px/30px var(--font, inherit); color: var(--sx-ink); white-space: nowrap; max-width: 180px; overflow: hidden; text-overflow: ellipsis; border-radius: 999px; }
.sx-mt-set > button.del { width: 26px; padding: 0; display: grid; place-items: center; color: var(--sx-ink3); }
.sx-mt-set > button.del .i { width: 12px; height: 12px; stroke: currentColor; stroke-width: 2; fill: none; }
.sx-mt-set > button.del:hover { color: var(--sx-ink); }
.sx-mt-set:hover { background: var(--sx-wash); }
.sx-mt-set.on { box-shadow: inset 0 0 0 1.5px var(--sx-ink); background: var(--sx-wash); }
.sx-mt-set.on > button:first-child { font-weight: 500; }
.sx-mt-set > button:focus-visible, .sx-mt-add:focus-visible, .sx-mt-img:focus-visible, .sx-mt-name button:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.sx-mt-add { all: unset; cursor: pointer; height: 30px; padding: 0 12px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--sx-line2); font: 500 13px/30px var(--font, inherit); color: var(--sx-ink2); }
.sx-mt-add:hover { background: var(--sx-wash); color: var(--sx-ink); }
.sx-mt-add:disabled { cursor: default; opacity: .5; background: none; }
.sx-mt-name { display: flex; gap: 6px; flex: 1 1 100%; }
.sx-mt-name input { flex: 1; min-width: 0; height: 30px; padding: 0 10px; border: 1px solid var(--sx-line2); border-radius: 8px; font: 450 13px/1 var(--font, inherit); color: var(--sx-ink); background: #fff; }
.sx-mt-name input:focus { outline: none; border-color: var(--sx-line3); box-shadow: 0 0 0 3px rgba(15,20,25,.06); }
.sx-mt-name button { all: unset; cursor: pointer; height: 30px; padding: 0 14px; border-radius: 8px; background: var(--sx-ink); color: #fff; font: 500 13px/30px var(--font, inherit); }
.sx-mt-pnote { margin: 0 8px 4px; font: 400 12px/1.4 var(--font, inherit); color: var(--sx-ink3); }
.sx-mt-pnote.err { color: var(--status-refused, #991b1b); }
.sx-mt-foot { display: flex; padding: 4px 4px 2px; border-top: 1px solid var(--sx-line); }
.sx-mt-img { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 8px; border-radius: 8px; font: 500 13px/1 var(--font, inherit); color: var(--sx-ink); }
.sx-mt-img:hover { background: var(--sx-wash); }
.sx-mt-img .i { width: 16px; height: 16px; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; color: var(--sx-ink3); }
.sx-under-panel { visibility: hidden; pointer-events: none; }
