

.sx-asm-btn:active { transform: scale(.97); }
.sx .maplibregl-canvas.sx-asm-on { cursor: crosshair; }

.sx-asm { position: absolute; left: 12px; top: 58px; z-index: 3; width: 340px; max-height: calc(100% - 58px - 76px); box-sizing: border-box; border-radius: 14px; overflow: auto; overscroll-behavior: contain;
  display: flex; flex-direction: column; font-size: 13px; color: var(--sx-ink); animation: sx-drop var(--sx-med) var(--sx-ease); scrollbar-width: thin; }
.sx-asm[hidden] { display: none; }
.sx-asm-hd { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 6px; padding: 10px 8px 10px 14px; background: var(--card-bg, #fff); border-bottom: 1px solid var(--sx-line); }
.sx-asm-t { all: unset; flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 8px; cursor: default; }
.sx-asm-t b { font-size: 14px; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; }
.sx-asm-t span { font-size: 12.5px; color: var(--sx-ink3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.sx-asm-t .i { display: none; }
.sx-asm-done { all: unset; cursor: pointer; height: 28px; padding: 0 10px; border-radius: 8px; font: 500 12.5px/28px var(--font, inherit); color: var(--sx-ink); box-shadow: inset 0 0 0 1px var(--sx-line2);
  transition: background-color var(--sx-fast) var(--sx-ease), box-shadow var(--sx-fast) var(--sx-ease); }
.sx-asm-done:hover { background: var(--sx-wash); box-shadow: inset 0 0 0 1px var(--sx-line3); }
.sx-asm-x, .sx-asm-rm { all: unset; cursor: pointer; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; color: var(--sx-ink3); flex: none;
  transition: background-color var(--sx-fast) var(--sx-ease), color var(--sx-fast) var(--sx-ease); }
.sx-asm-x:hover, .sx-asm-rm:hover { background: var(--sx-wash); color: var(--sx-ink); }
.sx-asm-x .i, .sx-asm-rm .i { width: 15px; height: 15px; stroke-width: 2; }

.sx-asm-body { padding: 12px 14px 14px; display: grid; gap: 12px; }
.sx-asm-hint { margin: 0; font-size: 13px; line-height: 1.45; color: var(--sx-ink2); }
.sx-asm-hint.sub { font-size: 12px; color: var(--sx-ink3); }
.sx-asm-note { margin: 0; padding: 8px 10px; border-radius: 10px; background: var(--sx-soft); font-size: 12.5px; line-height: 1.4; color: var(--sx-ink2); }
.sx-asm-link { all: unset; cursor: pointer; font-weight: 500; color: var(--brand-dark); text-decoration: underline; text-underline-offset: 2px; }

.sx-asm-size { display: grid; gap: 2px; }
.sx-asm-size b { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.sx-asm-size small { font-size: 12.5px; font-weight: 500; color: var(--sx-ink3); font-variant-numeric: tabular-nums; }

.sx-asm-kv { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px 12px; margin: 0; align-items: baseline; }
.sx-asm-kv dt { color: var(--sx-ink2); min-width: 0; }
.sx-asm-kv dd { margin: 0; font-weight: 550; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sx-asm-kv .sx-dens { font-size: 12px; }
[data-asm-how] { position: relative; cursor: help; text-decoration: underline dotted rgba(15,20,25,.3); text-underline-offset: 3px; }
[data-asm-how]::after { content: attr(data-asm-how); position: absolute; left: 0; top: calc(100% + 6px); z-index: 4; width: 250px; box-sizing: border-box; padding: 9px 11px; border-radius: 10px;
  background: var(--sx-ink); color: #fff; font: 450 12.5px/1.45 var(--font, inherit); text-decoration: none; white-space: normal; pointer-events: none;
  opacity: 0; transform: translateY(-2px); transition: opacity var(--sx-fast) var(--sx-ease), transform var(--sx-fast) var(--sx-ease); }
[data-asm-how].how::after { opacity: 1; transform: none; }
[data-asm-how]:focus-visible { outline-offset: 1px; border-radius: 3px; }

.sx-asm-sec { display: grid; gap: 7px; padding-top: 12px; border-top: 1px solid var(--sx-line); }
.sx-asm-sec h4 { margin: 0; font-size: 12px; font-weight: 500; color: var(--sx-ink3); }
.sx-asm-line { margin: 0; display: flex; gap: 8px; align-items: flex-start; line-height: 1.45; color: var(--sx-ink2); }
.sx-asm-line b { color: var(--sx-ink); font-weight: 600; }
.sx-asm-line .i { width: 15px; height: 15px; margin-top: 2px; stroke-width: 2.2; color: var(--brand-dark); }
.sx-asm-line.bad .i { color: var(--sx-warn); }
.sx-asm-own { margin: 0; line-height: 1.45; }

.sx-asm-parts { display: grid; margin: 0 -6px; }
.sx-asm-part { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px; border-radius: 10px; transition: background-color var(--sx-fast) var(--sx-ease); }
.sx-asm-part:hover, .sx-asm-part.is-edit { background: var(--sx-wash); }
.sx-asm-part .acts { display: flex; gap: 0; padding-right: 2px; }
.sx-asm-open { all: unset; cursor: pointer; min-width: 0; display: grid; grid-template-columns: 44px minmax(0, 1fr); align-items: center; gap: 10px; padding: 6px; border-radius: 10px; }
.sx-asm-open b { display: block; font-size: 13px; font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sx-asm-open small { display: block; margin-top: 1px; font-size: 12px; color: var(--sx-ink3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.sx-asm-open .th { width: 44px; height: 33px; border-radius: 6px; background: var(--sx-soft); box-shadow: inset 0 0 0 1px var(--sx-line); display: grid; place-items: center; overflow: hidden; }
.sx-asm-open .th svg { width: 44px; height: 33px; display: block; }
.sx-asm-open .th path { fill: rgba(22,48,92,.12); stroke: var(--filter-accent, #16305c); stroke-width: 1.4; stroke-linejoin: round; fill-rule: evenodd; vector-effect: non-scaling-stroke; }
.sx-asm-part.is-loading { padding: 6px; grid-template-columns: 44px 1fr; gap: 10px; color: var(--sx-ink3); }
.sx-asm-part.is-loading .th { width: 44px; height: 33px; border-radius: 6px; background: var(--sx-soft); }
.sx-asm-saved { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; margin: 0 -6px; border-radius: 10px; }
.sx-asm-saved:hover { background: var(--sx-wash); }
.sx-asm-saved .sx-asm-open { grid-template-columns: minmax(0, 1fr); gap: 2px; padding: 7px 6px; }
.sx-asm-saved .sx-asm-open > span { font-size: 12px; color: var(--sx-ink3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }

.sx-asm-foot { display: grid; gap: 8px; padding-top: 12px; border-top: 1px solid var(--sx-line); }
.sx-asm-name { display: grid; gap: 4px; }
.sx-asm-name span { font-size: 12px; font-weight: 500; color: var(--sx-ink3); }
.sx-asm-name input { box-sizing: border-box; width: 100%; height: 34px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--border-hover, #cfd9de); background: #fff; font: 500 13px/1 var(--font, inherit); color: var(--sx-ink); }
.sx-asm-name input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(13,148,136,.15); }

.sx-asm-row2 { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; }
.sx-asm-b { all: unset; box-sizing: border-box; cursor: pointer; height: 34px; padding: 0 10px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 0;
  font: 500 12.5px/1 var(--font, inherit); color: var(--sx-ink); box-shadow: inset 0 0 0 1px var(--sx-line2); white-space: nowrap;
  transition: background-color var(--sx-fast) var(--sx-ease), box-shadow var(--sx-fast) var(--sx-ease), transform var(--sx-med) var(--sx-ease); }
.sx-asm-b span { overflow: hidden; text-overflow: ellipsis; }
.sx-asm-b:hover { background: var(--sx-wash); box-shadow: inset 0 0 0 1px var(--sx-line3); }
.sx-asm-b:active { transform: scale(.97); }
.sx-asm-b .i { width: 15px; height: 15px; stroke-width: 2; }
.sx-asm-b.prim { background: var(--sx-ink); color: #fff; box-shadow: none; }
.sx-asm-b.prim:hover { background: #262d33; }
.sx-asm-b:focus-within, .sx-asm-b:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

@media (max-width: 768px) {
  .sx-asm { position: fixed; left: 0; right: 0; top: auto; bottom: 0; width: auto; z-index: 30; max-height: calc(62vh / var(--bs-zoom, 1)); border-radius: 16px 16px 0 0;
    padding-bottom: env(safe-area-inset-bottom, 0px); box-shadow: 0 -10px 34px rgba(15,20,25,.2); animation: sx-sheet-in 320ms cubic-bezier(.32,.72,0,1); }
  .sx-asm-hd { padding: 12px 10px 12px 16px; }
  .sx-asm-t { cursor: pointer; }
  .sx-asm-t .i { display: block; width: 16px; height: 16px; align-self: center; color: var(--sx-ink3); transition: transform var(--sx-med) var(--sx-ease); }
  .sx-asm.is-collapsed .sx-asm-t .i { transform: rotate(180deg); }
  .sx-asm.is-collapsed .sx-asm-body { display: none; }
  .sx-asm-body { padding: 12px 16px 16px; }
  [data-asm-how]::after { display: none; }
}
@media (prefers-reduced-motion: reduce) { .sx-asm, .sx-asm-btn, .sx-asm * { transition: none !important; animation: none !important; } }
