.swap-band {
  position: relative;
  background:
    radial-gradient(circle at top right, rgba(21, 122, 110, .14), transparent 34%),
    radial-gradient(circle at bottom left, rgba(217, 139, 43, .1), transparent 28%),
    var(--paper);
}

.swap-panel {
  display: grid;
  gap: 10px;
}

.swap-token-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  gap: 8px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  padding: 2px 2px 4px;
}

.swap-token-rail::-webkit-scrollbar {
  display: none;
}

.swap-token-chip {
  display: grid;
  gap: 2px;
  min-width: 76px;
  border: 1px solid rgba(30, 27, 24, .1);
  border-radius: 16px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, .78);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.swap-token-chip strong {
  font-size: .82rem;
  font-weight: 900;
}

.swap-token-chip span {
  color: var(--muted);
  font-size: .68rem;
  font-weight: 700;
  white-space: nowrap;
}

.swap-token-chip.is-active {
  border-color: transparent;
  background: linear-gradient(135deg, rgba(21, 122, 110, .95), rgba(46, 103, 177, .82));
  color: #fff7ea;
  box-shadow: 0 10px 24px rgba(21, 122, 110, .2);
}

.swap-token-chip.is-active span {
  color: rgba(255, 247, 234, .72);
}

.swap-path-line {
  color: var(--muted);
  font-size: .74rem;
  font-weight: 700;
}

.swap-path-line strong {
  color: var(--ink);
  font-weight: 900;
}

.swap-field {
  border: 1px solid rgba(30, 27, 24, .1);
  border-radius: 20px;
  padding: 14px 14px 12px;
  background: rgba(255, 255, 255, .72);
}

.swap-field-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: .74rem;
  font-weight: 800;
}

.swap-max {
  border: 0;
  border-radius: 999px;
  padding: 5px 9px;
  background: rgba(21, 122, 110, .12);
  color: var(--teal);
  font-size: .68rem;
  font-weight: 900;
  cursor: pointer;
}

.swap-field-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.swap-field-row input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--ink);
  font-size: 1.55rem;
  font-weight: 900;
  line-height: 1.1;
}

.swap-field-row input[readonly] {
  color: rgba(30, 27, 24, .72);
}

.swap-token {
  flex: 0 0 auto;
  border: 1px solid rgba(30, 27, 24, .1);
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(30, 27, 24, .06);
  color: var(--ink);
  font-size: .82rem;
  font-weight: 900;
  white-space: nowrap;
}

.swap-token.is-button {
  cursor: pointer;
}

.swap-token.is-button:after {
  content: "▾";
  margin-left: 6px;
  color: var(--muted);
  font-size: .72rem;
}

.swap-field-meta {
  margin-top: 8px;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 700;
}

.swap-field-meta strong {
  color: var(--ink);
  font-weight: 900;
}

.swap-flip {
  justify-self: center;
  width: 42px;
  height: 42px;
  margin: -2px 0;
  border: 1px solid rgba(30, 27, 24, .12);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(21, 122, 110, .95), rgba(46, 103, 177, .85));
  color: #fff7ea;
  font-size: 1.1rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(21, 122, 110, .22);
}

.swap-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: .74rem;
  font-weight: 700;
}

.swap-meta-row strong {
  color: var(--ink);
  font-weight: 900;
}

.swap-slippage {
  display: inline-flex;
  gap: 6px;
}

.swap-slippage button {
  border: 1px solid rgba(30, 27, 24, .1);
  border-radius: 999px;
  padding: 6px 9px;
  background: rgba(255, 255, 255, .7);
  color: var(--muted);
  font-size: .68rem;
  font-weight: 900;
  cursor: pointer;
}

.swap-slippage button.is-active {
  border-color: transparent;
  background: rgba(217, 139, 43, .16);
  color: var(--amber);
}

.swap-action {
  width: 100%;
  border: 0;
  border-radius: 18px;
  padding: 15px 16px;
  background: linear-gradient(135deg, rgba(30, 27, 24, .96), rgba(20, 87, 80, .92) 62%, rgba(217, 139, 43, .78));
  color: #fff7ea;
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: .02em;
  cursor: pointer;
  box-shadow: 0 18px 42px rgba(39, 41, 25, .18);
}

.swap-action:disabled {
  opacity: .72;
  cursor: wait;
}

.swap-status {
  min-height: 1.2em;
  color: var(--muted);
  font-size: .76rem;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
}

.swap-tx-link {
  display: block;
  text-align: center;
  color: var(--teal);
  font-size: .76rem;
  font-weight: 800;
  text-decoration: none;
}

.swap-tx-link[hidden] {
  display: none !important;
}

.swap-verify-note {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(217, 139, 43, .28);
  border-radius: 14px;
  padding: 10px 12px;
  background: rgba(217, 139, 43, .08);
}

.swap-verify-note span {
  color: var(--muted);
  font-size: .7rem;
  font-weight: 700;
  line-height: 1.4;
}

.swap-verify-note code {
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .66rem;
  font-weight: 700;
  word-break: break-all;
}

.swap-token-sheet {
  position: fixed;
  inset: 0;
  z-index: 120;
}

.swap-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 16, 14, .46);
  backdrop-filter: blur(4px);
}

.swap-sheet-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: min(78vh, 640px);
  display: grid;
  grid-template-rows: auto auto auto auto minmax(0, 1fr);
  gap: 10px;
  border-radius: 24px 24px 0 0;
  padding: 10px 16px calc(18px + env(safe-area-inset-bottom, 0px));
  background: #fffaf2;
  box-shadow: 0 -18px 48px rgba(30, 27, 24, .22);
}

.swap-sheet-grab {
  width: 42px;
  height: 4px;
  margin: 2px auto 0;
  border-radius: 999px;
  background: rgba(30, 27, 24, .16);
}

.swap-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.swap-sheet-head strong {
  color: var(--ink);
  font-size: 1.05rem;
}

.swap-sheet-close {
  border: 0;
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(30, 27, 24, .06);
  color: var(--muted);
  font-size: .74rem;
  font-weight: 800;
  cursor: pointer;
}

.swap-sheet-search {
  width: 100%;
  border: 1px solid rgba(30, 27, 24, .1);
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, .9);
  color: var(--ink);
  font-size: .92rem;
  font-weight: 700;
  outline: none;
}

.swap-sheet-import {
  border: 0;
  border-radius: 14px;
  padding: 11px 12px;
  background: rgba(21, 122, 110, .12);
  color: var(--teal);
  font-size: .8rem;
  font-weight: 900;
  cursor: pointer;
}

.swap-sheet-list {
  overflow: auto;
  display: grid;
  gap: 8px;
  padding-bottom: 4px;
}

.swap-sheet-token {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  border: 1px solid rgba(30, 27, 24, .08);
  border-radius: 16px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, .86);
  text-align: left;
  cursor: pointer;
}

.swap-sheet-token strong {
  display: block;
  color: var(--ink);
  font-size: .95rem;
}

.swap-sheet-token span,
.swap-sheet-token em {
  color: var(--muted);
  font-size: .72rem;
  font-style: normal;
  font-weight: 700;
}

@media (max-width: 720px) {
  .swap-field-row input {
    font-size: 1.35rem;
  }

  .swap-action {
    padding: 14px 14px;
  }
}
