* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  background-color: var(--stage);
  background-image: var(--stage-image);
  background-size: cover;
  background-position: center 42%;
  background-repeat: no-repeat;
  overflow: hidden;
}

body {
  font-family: var(--font);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

button {
  font: inherit;
  cursor: pointer;
}

code {
  font-family: var(--font-mono);
  font-size: 0.82em;
}

.stage {
  height: 100%;
  min-height: 720px;
  display: grid;
  place-items: center;
  padding: 0;
  overflow: hidden;
  background-color: var(--stage);
  background-image:
    linear-gradient(180deg, rgba(18, 23, 17, 0.18) 0%, rgba(18, 23, 17, 0.38) 100%),
    var(--stage-image);
  background-size: cover;
  background-position: center 42%;
  background-repeat: no-repeat;
}

.phone {
  width: min(100%, 360px);
  height: 720px;
  min-height: 720px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-phone);
  padding: 24px 24px 18px;
  box-shadow: 0 22px 48px rgba(18, 23, 17, 0.22);
}

.phone-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 0 8px;
}

.replay-banner {
  margin: 0 0 16px;
  color: var(--ink);
  opacity: 0.6;
  font-size: 11.52px;
  font-weight: 400;
  line-height: 14px;
}

.phone-head h2 {
  margin: 0;
  font-size: 16.32px;
  font-weight: 500;
  letter-spacing: -0.4896px;
  line-height: 20px;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 10px 0 8px;
  height: 20px;
  border-radius: 999px;
  border: 1px solid var(--accent-wash);
  background: var(--accent-wash);
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: -0.002em;
  line-height: 20px;
  text-transform: uppercase;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.screen {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  animation: in 0.28s ease;
}

.is-hidden {
  display: none;
}

.leg-kicker {
  margin: 0;
  color: var(--ink);
  opacity: 0.6;
  font-size: 10.88px;
  font-weight: 500;
  letter-spacing: -0.1px;
  line-height: 13px;
  text-transform: none;
}

.leg[aria-label="Recipient"] .leg-kicker {
  color: var(--lime-deep);
}

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

.leg-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.amount-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 6px;
}

.amount {
  font-family: var(--font);
  font-size: 38.4px;
  font-weight: 600;
  letter-spacing: -2.304px;
  font-variant-numeric: tabular-nums;
  line-height: 38px;
}

.payee,
.tx {
  display: flex;
  align-items: center;
  gap: 8px;
}

.asset-dropdown {
  position: relative;
  flex: 0 0 auto;
}

.asset-trigger {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 8px 12px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: var(--on-ink);
  font: inherit;
  font-size: 14.72px;
  font-weight: 600;
  line-height: 17px;
}

.asset-trigger:disabled {
  cursor: default;
  opacity: 0.55;
}

.asset-trigger svg {
  display: block;
  flex-shrink: 0;
}

.asset-dropdown.is-open .asset-trigger svg {
  transform: rotate(180deg);
}

.asset-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 5;
  min-width: 100%;
  margin: 0;
  padding: 6px;
  list-style: none;
  border: 1px solid var(--line-dash);
  border-radius: 14px;
  background: var(--card);
  box-shadow: 0 12px 28px rgba(10, 20, 12, 0.16);
}

.asset-menu li {
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
}

.asset-menu li:hover:not(.is-off) {
  background: var(--cream);
}

.asset-menu li[aria-selected="true"] {
  background: var(--lime);
  color: var(--on-lime);
}

.asset-menu li.is-off {
  color: var(--disabled);
  cursor: default;
}

.dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink);
}

.amount-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  color: var(--ink);
  opacity: 0.6;
  font-size: 13.12px;
  line-height: 15px;
}

.split {
  margin: 0 0 4px;
}

.leg {
  padding: 2px 0 4px;
}

.leg[aria-label="Recipient"] {
  padding: 14px 0 4px;
}

.leg .corridor-row {
  margin-top: 12px;
}

.leg-break {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  margin: 10px 0 0;
}

.leg-rule {
  display: block;
  height: 1px;
  border: 0;
  background: linear-gradient(
    270deg,
    rgba(43, 42, 40, 0) 0%,
    rgba(43, 42, 40, 0.12) 9.11%,
    rgba(43, 42, 40, 0.12) 91.35%,
    rgba(43, 42, 40, 0) 100%
  );
}

.corridor.is-locked {
  pointer-events: none;
  opacity: 0.72;
}

.pills {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
  min-height: 36px;
}

.pill {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin: 0;
  padding: 8px 4px;
  border: 0;
  border-radius: 999px;
  background: var(--cream);
  color: #171d15;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: -0.12px;
  line-height: 14px;
  transition: background 0.12s ease, opacity 0.12s ease;
}

.pill .dot {
  width: 7px;
  height: 7px;
  flex-shrink: 0;
  background: transparent;
  border: 1.5px solid var(--ink);
  box-sizing: border-box;
}

.pill:hover:not(:disabled) {
  background: var(--surface);
}

.pill.is-on {
  background: var(--cream);
  color: #171d15;
}

.pill.is-on .dot {
  background: var(--ink);
  border-color: var(--ink);
}

.pill.is-off {
  opacity: 0.38;
}

.pill:disabled {
  cursor: default;
  opacity: 0.38;
}

.btn-swap {
  appearance: none;
  display: grid;
  place-items: center;
  min-width: 36px;
  height: 28px;
  margin: 0;
  padding: 0 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  opacity: 0.5;
  font-family: var(--font);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 12px;
  text-transform: none;
  transition: background 0.12s ease, opacity 0.12s ease;
}

.btn-swap:hover:not(:disabled) {
  background: var(--cream);
  opacity: 0.8;
}

.btn-swap:disabled {
  cursor: default;
  opacity: 0.45;
}

.payee {
  margin-top: 14px;
  padding: 0 0 4px;
  justify-content: flex-start;
}

.payee-mark {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--lime);
  color: var(--payee-ink);
  font-family: Inter, var(--font);
  font-size: 12.8px;
  font-weight: 700;
  line-height: 15px;
}

.payee strong {
  display: block;
  font-size: 15.2px;
  font-weight: 600;
  line-height: 18px;
}

.payee code {
  margin-left: auto;
  color: var(--ink-65);
  font-family: var(--font);
  font-size: 13.12px;
  font-weight: 400;
  line-height: 15px;
}

.facts {
  margin: 16px 0 20px;
}

.facts > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  font-size: 14.08px;
  line-height: 17px;
  border-top: 1px dashed var(--line-dash);
}

.facts > div:first-child {
  border-top: 0;
}

.facts dt {
  color: var(--ink);
  opacity: 0.6;
  font-weight: 400;
}

.facts dd {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.5px;
}

.btn {
  appearance: none;
  border: 0;
  border-radius: 50px;
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: 0;
  transition: background 0.12s ease, opacity 0.12s ease;
}

.btn:disabled {
  cursor: default;
  opacity: 0.55;
}

.btn-send {
  width: 100%;
  margin-top: auto;
  padding: 12px 24px;
  height: 48px;
  font-size: 16px;
  line-height: 24px;
  background: var(--lime);
  color: var(--on-lime);
}

.btn-send:hover {
  background: var(--lime-press);
}

.sending-kicker {
  margin: 0;
  color: var(--lime-deep);
  opacity: 0.6;
  font-size: 10.88px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 13px;
  text-transform: none;
  font-variant-numeric: tabular-nums;
}

.pipe {
  margin: 10px 0 0;
}

.pipe-captions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.pipe-caption,
.pipe-key {
  font-size: 10.88px;
  font-weight: 500;
  line-height: 13px;
}

.pipe-caption {
  color: var(--ink);
  opacity: 0.6;
}

.pipe-key {
  color: var(--ink);
}

.pipe-key::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 3px;
  margin-right: 6px;
  border-radius: 999px;
  background: var(--lime);
  vertical-align: middle;
}

.pipe-track {
  position: relative;
  width: 100%;
  height: 168px;
  border-radius: 16px;
  background: var(--map-bg);
}

.pipe-svg {
  display: block;
  width: 100%;
  height: 168px;
}

.map-decoy,
.map-from,
.map-to,
.pipe-under,
.pipe-run {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.map-decoy {
  stroke: var(--map-decoy);
  stroke-width: 4;
}

.map-decoy-cyan {
  stroke: var(--cyan);
  stroke-opacity: 0.45;
}

.map-from,
.map-to {
  stroke-width: 6;
}

.pipe[data-from="base"] .map-from {
  stroke: var(--chain-base);
}

.pipe[data-from="solana"] .map-from {
  stroke: var(--chain-solana);
}

.pipe[data-from="tempo"] .map-from {
  stroke: var(--chain-tempo);
}

.pipe[data-to="base"] .map-to {
  stroke: var(--chain-base);
}

.pipe[data-to="solana"] .map-to {
  stroke: var(--chain-solana);
}

.pipe[data-to="tempo"] .map-to {
  stroke: var(--chain-tempo);
}

.pipe-under {
  stroke: var(--map-decoy);
  stroke-width: 6;
}

.pipe-run {
  stroke: var(--lime);
  stroke-width: 6;
}

.map-stop-decoy {
  fill: var(--map-stop);
  stroke: var(--map-decoy);
  stroke-width: 2;
}

.map-stop {
  fill: var(--map-stop);
  stroke: var(--map-ring);
  stroke-width: 2;
}

.map-stop.is-on,
.map-stop.is-done {
  stroke: var(--lime);
}

.map-stop.is-done {
  fill: var(--lime);
}

.pipe[data-from="base"] .mouth-from {
  stroke: var(--chain-base);
}

.pipe[data-from="solana"] .mouth-from {
  stroke: var(--chain-solana);
}

.pipe[data-from="tempo"] .mouth-from {
  stroke: var(--chain-tempo);
}

.pipe[data-to="base"] .mouth-to {
  stroke: var(--chain-base);
}

.pipe[data-to="solana"] .mouth-to {
  stroke: var(--chain-solana);
}

.pipe[data-to="tempo"] .mouth-to {
  stroke: var(--chain-tempo);
}

.pipe-packet {
  position: absolute;
  top: 0;
  left: 0;
  width: 16px;
  height: 8px;
  margin: -4px 0 0 -8px;
  border-radius: 999px;
  background: var(--pipe-capsule);
  box-shadow: 0 0 10px var(--lime-glow);
  pointer-events: none;
}

.pipe-packet[hidden] {
  display: none;
}

.steps {
  list-style: none;
  margin: 0;
  padding: 18px 0 12px;
}

.steps li {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 16px;
  align-items: start;
  padding: 7px 0;
  opacity: 0.35;
  transition: opacity 0.2s ease;
}

.steps li.is-active {
  opacity: 0.8;
}

.steps li.is-done {
  opacity: 1;
}

.step-mark {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  border-radius: 50%;
  border: 1px solid var(--ink-60);
  background: var(--card);
  position: relative;
}

.steps li.is-active .step-mark {
  border-color: var(--ink-60);
}

.steps li.is-done .step-mark {
  border-color: var(--lime);
  background: var(--lime);
}

.steps li.is-done .step-mark::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 3px;
  width: 5.23px;
  height: 7.47px;
  border: solid #171d15;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}

.steps strong {
  display: block;
  font-size: 15.68px;
  font-weight: 600;
  letter-spacing: -0.3136px;
  line-height: 18px;
}

.steps em {
  display: block;
  margin-top: 2px;
  color: var(--ink);
  opacity: 0.6;
  font-style: normal;
  font-size: 12.8px;
  line-height: 15px;
}

.board {
  padding: 4px 0 0;
}

.board-kicker {
  margin: 0 0 8px;
  color: var(--lime-deep);
  opacity: 0.6;
  font-size: 10.88px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 13px;
  text-transform: none;
}

.board-score {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin-top: 0;
  padding: 16px 16px 14px;
  border: 0;
  border-radius: 16px;
  background: var(--cream);
}

.board-best {
  margin: 0;
  color: var(--ink);
  opacity: 0.5;
  font-size: 9.92px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 12px;
  text-transform: none;
}

.board-rank {
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--p1);
  color: var(--card);
  font-family: var(--font);
  font-size: 10.88px;
  font-weight: 700;
  letter-spacing: 0.4352px;
  line-height: 13px;
}

.split .leg:last-of-type .board-rank {
  background: var(--p2);
  color: var(--ink);
}

.board-time {
  margin: 0;
  font-family: var(--font);
  font-size: 41.6px;
  font-weight: 600;
  letter-spacing: -2px;
  font-variant-numeric: tabular-nums;
  line-height: 42px;
}

.board-cheer {
  margin: 0;
  color: var(--ink);
  font-family: Inter, var(--font);
  font-size: 12.48px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 15px;
  text-transform: none;
}

.board-track {
  margin: 12px 0 0;
  color: var(--ink);
  opacity: 0.6;
  font-size: 12.48px;
  font-weight: 500;
  line-height: 15px;
}

.board-arrow {
  margin: 0 6px;
  color: var(--ink);
  font-family: Inter, var(--font);
}

.board-payout {
  margin: 4px 0 0;
  font-family: var(--font);
  font-size: 15.2px;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.25px;
  line-height: 18px;
}

.board-table {
  width: 100%;
  margin: 16px 0 0;
  border-collapse: collapse;
  font-size: 12.48px;
}

.board-table th,
.board-table td {
  padding: 6.5px 0;
  text-align: left;
  border-bottom: 1px solid var(--line-soft);
}

.board-table th {
  color: var(--ink);
  opacity: 0.6;
  font-size: 9.92px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 12px;
  text-transform: none;
}

.board-table th:first-child {
  text-transform: uppercase;
}

.board-table td:first-child,
.board-table th:first-child {
  width: 28px;
  font-family: var(--font);
  color: var(--ink);
  opacity: 0.6;
}

.board-table td:nth-child(2) {
  font-weight: 600;
}

.board-table td:nth-child(3),
.board-table th:nth-child(3) {
  text-align: right;
  font-family: var(--font);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.board-table td:last-child,
.board-table th:last-child {
  width: 48px;
  text-align: right;
  color: var(--lime-deep);
  opacity: 0.6;
  font-size: 9.92px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

.board-meta {
  margin: 8px 0 0;
}

.board-meta > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  font-size: 12.8px;
  line-height: 15px;
  border-bottom: 1px solid var(--line-soft);
}

.board-meta dt {
  color: var(--ink);
  opacity: 0.6;
}

.board-meta dd {
  margin: 0;
  font-weight: 600;
}

.tx-links {
  display: grid;
  margin-top: 10px;
}

.tx {
  justify-content: space-between;
  padding: 10px 0;
  border-top: 1px solid var(--line-soft);
  text-decoration: none;
  color: inherit;
}

.tx-links .tx:first-child {
  border-top: 0;
}

.tx span {
  color: var(--ink);
  opacity: 0.6;
  font-size: 11.52px;
  font-weight: 500;
  line-height: 14px;
}

.tx strong {
  margin-left: auto;
  margin-right: 10px;
  font-size: 14.08px;
  font-weight: 600;
  line-height: 17px;
}

.tx em {
  font-style: normal;
  font-size: 12.48px;
  color: var(--lime-deep);
  opacity: 0.6;
  font-weight: 400;
  line-height: 15px;
}

@keyframes in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .pipe-packet {
    transition: none;
  }
}
