.sw-grid {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 22px;
  align-items: start;
}

.sw-board { min-width: 0; }

.sw-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.sw-head h2 {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.sw-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sw-swap {
  position: relative;
  padding: 24px;
  overflow: hidden;
  transition: height 0.35s ease, padding 0.35s ease, opacity 0.3s ease, border-color 0.3s ease;
}

.sw-flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 18px;
  align-items: center;
}

.sw-give, .sw-want {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  align-self: start;
}

.sw-arrow {
  color: var(--ink-3);
  display: flex;
  align-items: center;
}

.sw-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}

.sw-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
}

.sw-name {
  font-size: 13px;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sw-eth { margin-top: 2px; }

.sw-swap .chip {
  text-transform: none;
  letter-spacing: 0.04em;
}

.sw-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
  padding-top: 16px;
}

.sw-foot-sp { flex: 1; }

.sw-stamp {
  position: absolute;
  top: 12px;
  right: 12px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--ink-2);
  background: var(--deep);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 3px 8px;
}

.sw-fillstamp {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  letter-spacing: 0.3em;
  text-indent: 0.3em;
  color: var(--acid);
  background: var(--shade);
  animation: sw-stamp-in 0.2s ease;
}

@keyframes sw-stamp-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.sw-filling { animation: sw-flash 0.7s ease; }

@keyframes sw-flash {
  0% { border-color: var(--acid); }
  100% { border-color: var(--hairline); }
}

.sw-collapse {
  opacity: 0;
  padding-top: 0;
  padding-bottom: 0;
  margin-bottom: -14px;
}

.sw-builder {
  padding: 28px;
  position: sticky;
  top: 86px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sw-builder .watch-note { margin-bottom: 0; }

.sw-side {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sw-side + .sw-side,
.sw-cp {
  border-top: 1px solid var(--hairline);
  padding-top: 20px;
}

.sw-side-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.sw-val {
  font-size: 11.5px;
  color: var(--ink-2);
}

.sw-picked {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.sw-sel {
  position: relative;
  padding: 0;
  border-radius: 10px;
}

.sw-sel .tile { display: block; }

.sw-sel:hover .tile { border-color: var(--ink-3); }

.sw-x {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 15px;
  height: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  line-height: 1;
  color: var(--ink-2);
  background: var(--raised);
  border: 1px solid var(--rule);
  border-radius: 50%;
}

.sw-sel:hover .sw-x {
  color: var(--ink);
  border-color: var(--ink-3);
}

.sw-picker {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  background: var(--deep);
  border: 1px solid var(--hairline);
  border-radius: var(--r-input);
}

.sw-picker[hidden] { display: none; }

.sw-picker .input { background: var(--surface); }

.sw-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(34px, 1fr));
  gap: 6px;
  max-height: 212px;
  overflow: auto;
  padding-right: 2px;
}

.sw-pick {
  padding: 0;
  aspect-ratio: 1;
  cursor: pointer;
  transition: border-color 0.15s;
}

.sw-pick:hover { border-color: var(--ink-3); }

.sw-pick svg {
  width: 100%;
  height: 100%;
}

.sw-pick .tile {
  width: 100% !important;
  height: 100% !important;
  border: 0;
  border-radius: 0;
  background: none;
}

.sw-fee {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  color: var(--ink-3);
}

.sw-post { justify-content: center; }

@media (max-width: 940px) {
  .sw-grid { grid-template-columns: 1fr; }
  .sw-builder { position: static; }
}

@media (max-width: 560px) {
  .sw-flow {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .sw-arrow {
    transform: rotate(90deg);
    justify-self: start;
    margin-left: 8px;
  }
  .sw-foot .btn-sm {
    flex-basis: 100%;
    justify-content: center;
  }
}

.sw-board:only-child { grid-column: 1 / -1; max-width: 720px; }
