.mx-sf-root {
  --mx-sf-accent: var(--theme-primary, #414042);
  --mx-sf-btn-bg: #fff;
  --mx-sf-btn-text: var(--mx-sf-accent);
  --mx-sf-btn-border: var(--mx-sf-accent);
  --mx-sf-panel-bg: #f6f1e7;
  --mx-sf-head-bg: #1e1e2c;
  --mx-sf-head-text: #fff;
  --mx-sf-cta-bg: var(--mx-sf-accent);
  --mx-sf-cta-text: #fff;
  --mx-sf-radius: 18px;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin: 8px 0 12px;
}
.mx-sf-root:empty,
.mx-sf-root:not(:has(*)) {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
  gap: 0 !important;
  height: 0 !important;
  min-height: 0 !important;
  overflow: hidden !important;
}
.mx-sf-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1.5px solid var(--mx-sf-btn-border);
  border-radius: 999px;
  background: var(--mx-sf-btn-bg);
  color: var(--mx-sf-btn-text);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.mx-sf-trigger:hover,
.mx-sf-trigger[data-mx-sf-btn-style="solid"] {
  background: var(--mx-sf-accent);
  color: #fff;
  border-color: var(--mx-sf-accent);
}
body.mx-sf-lock { overflow: hidden; }
.mx-sf-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147482901;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(18, 15, 12, .55);
  backdrop-filter: blur(2px);
}
.mx-sf-overlay.is-open { display: flex; }
.mx-sf-panel {
  width: min(100%, 480px);
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-radius: var(--mx-sf-radius);
  background: var(--mx-sf-panel-bg);
  box-shadow: 0 20px 60px rgba(20, 16, 12, .3);
}
.mx-sf-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: var(--mx-sf-head-bg);
  color: var(--mx-sf-head-text);
}
.mx-sf-title {
  margin: 0;
  color: inherit;
  font-size: 16px;
  font-weight: 700;
}
.mx-sf-close {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.14);
  color: inherit;
  cursor: pointer;
}
.mx-sf-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}
.mx-sf-seg {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  padding: 4px;
  border-radius: 12px;
  background: rgba(30, 30, 44, 0.08);
}
.mx-sf-seg button {
  flex: 1;
  padding: 9px 4px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: rgba(30, 30, 44, 0.6);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.mx-sf-seg button.is-on {
  background: #fff;
  color: #1e1e2c;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}
.mx-sf-opts--tones {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.mx-sf-opt--tone {
  flex: 1 1 72px;
  min-width: 72px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 8px;
}
.mx-sf-tone-dot {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid rgba(30, 30, 44, 0.14);
  background: var(--mx-sf-tone, #c9926a);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}
.mx-sf-opt--tone.is-on .mx-sf-tone-dot {
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.2),
    0 0 0 2px color-mix(in srgb, var(--mx-sf-accent) 28%, transparent);
}
.mx-sf-fld { margin-bottom: 18px; }
.mx-sf-lbl {
  margin: 0 0 4px;
  color: #1e1e2c;
  font-size: 14px;
  font-weight: 700;
}
.mx-sf-hint,
.mx-sf-note {
  margin: 0 0 12px;
  color: rgba(30,30,44,.68);
  font-size: 12.5px;
  line-height: 1.6;
}
.mx-sf-val {
  margin-bottom: 6px;
  color: var(--mx-sf-accent);
  font-size: 18px;
  font-weight: 700;
}
.mx-sf-range,
.mx-sf-search {
  width: 100%;
  accent-color: var(--mx-sf-accent);
}
.mx-sf-search {
  padding: 11px 12px;
  border: 1px solid rgba(30,30,44,.16);
  border-radius: 12px;
  background: #fff;
}
.mx-sf-scale {
  display: flex;
  justify-content: space-between;
  color: rgba(30,30,44,.58);
  font-size: 11px;
  direction: ltr;
}
.mx-sf-opts,
.mx-sf-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.mx-sf-list { flex-direction: column; }
.mx-sf-opt,
.mx-sf-list-item {
  flex: 1 1 90px;
  padding: 11px 10px;
  border: 1.5px solid rgba(30,30,44,.14);
  border-radius: 12px;
  background: #fff;
  color: #1e1e2c;
  font: inherit;
  cursor: pointer;
  text-align: center;
}
.mx-sf-list-item { text-align: start; }
.mx-sf-opt.is-on,
.mx-sf-list-item.is-on {
  border-color: var(--mx-sf-accent);
  background: color-mix(in srgb, var(--mx-sf-accent) 10%, #fff);
}
.mx-sf-opt .n,
.mx-sf-list-item .n { display: block; font-size: 13px; font-weight: 700; }
.mx-sf-opt .s,
.mx-sf-list-item .s { display: block; margin-top: 2px; color: rgba(30,30,44,.6); font-size: 11px; }
.mx-sf-cta,
.mx-sf-sec {
  width: 100%;
  padding: 12px 14px;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.mx-sf-cta {
  border: 0;
  background: var(--mx-sf-cta-bg);
  color: var(--mx-sf-cta-text);
}
.mx-sf-cta:disabled { opacity: .5; cursor: not-allowed; }
.mx-sf-sec {
  margin: 8px 0;
  border: 1px solid rgba(30,30,44,.18);
  background: transparent;
  color: #1e1e2c;
}
.mx-sf-res {
  margin-bottom: 14px;
  padding: 20px;
  border-radius: calc(var(--mx-sf-radius) - 2px);
  background: var(--mx-sf-head-bg);
  color: var(--mx-sf-head-text);
  text-align: center;
}
.mx-sf-res .rl { margin-bottom: 8px; color: var(--mx-sf-accent); font-size: 13px; }
.mx-sf-res .v { font-size: 42px; font-weight: 800; line-height: 1.1; }
.mx-sf-flag {
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--mx-sf-accent) 22%, #fff);
  border-radius: 10px;
  background: color-mix(in srgb, var(--mx-sf-accent) 8%, #fff);
  color: var(--mx-sf-accent);
  font-size: 12px;
  line-height: 1.6;
}
.mx-sf-flag--ok { background: #eef8f1; border-color: #c6e6d0; color: #1f6b3a; }
.mx-sf-flag--mid { background: #fff7e8; border-color: #f0d7a4; color: #8a5a12; }
.mx-sf-products {
  display: grid;
  gap: 10px;
  max-height: 340px;
  overflow: auto;
  margin-bottom: 14px;
}
.mx-sf-product {
  display: flex;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(30,30,44,.12);
  border-radius: 12px;
  background: #fff;
  color: inherit;
  text-decoration: none;
}
.mx-sf-product__media { width: 58px; height: 58px; flex: 0 0 58px; border-radius: 10px; overflow: hidden; background: #f3f3f3; }
.mx-sf-product__media img { width: 100%; height: 100%; object-fit: cover; }
.mx-sf-product__name { display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13px; font-weight: 700; }
.mx-sf-product__price { color: var(--mx-sf-accent); font-size: 12px; }
