:root {
  color-scheme: dark;
  --bg: #0b0e11;
  --panel: #1e2329;
  --panel-2: #2b3139;
  --panel-3: #161a1f;
  --line: #474d57;
  --muted: #929aa5;
  --text: #eaecef;
  --yellow: #f0b90b;
  --yellow-dark: #c99400;
  --green: #28c48f;
  --red: #f36f75;
  --blue: #6ea8fe;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  font-family:
    Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 50% -10%, rgba(240, 185, 11, 0.11), transparent 32rem),
    var(--bg);
  color: var(--text);
}

button,
input,
select {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.46;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(240, 185, 11, 0.35);
  outline-offset: 2px;
}

.page-shell {
  width: min(100% - 32px, 560px);
  margin: 0 auto;
  padding: 64px 0 40px;
}

.brand {
  margin-bottom: 24px;
  text-align: center;
}

.brand-mark {
  display: inline-flex;
  gap: 2px;
  color: var(--yellow);
  font-size: 26px;
  font-weight: 850;
  letter-spacing: -1.4px;
  text-decoration: none;
}

.brand-mark strong {
  color: #fff;
}

.brand p {
  margin: 6px 0 12px;
  color: var(--muted);
  font-size: 14px;
}

.service-state {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border: 1px solid rgba(146, 154, 165, 0.22);
  border-radius: 999px;
  background: rgba(30, 35, 41, 0.66);
  color: var(--muted);
  font-size: 12px;
}

.state-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
}

.service-state.is-ready .state-dot {
  background: var(--green);
  box-shadow: 0 0 12px rgba(40, 196, 143, 0.72);
}

.service-state.is-warning .state-dot {
  background: var(--yellow);
}

.exchange-card {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.045);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.mode-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
  background: var(--panel-3);
}

.mode-tab {
  min-height: 42px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.mode-tab.is-active {
  background: var(--panel-2);
  color: var(--text);
}

.view-panel {
  display: none;
  padding: 26px;
}

.view-panel.is-active {
  display: block;
}

.section-heading,
.quote-toolbar,
.order-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.section-heading {
  margin-bottom: 24px;
}

.section-heading h1,
.order-card-header h2 {
  margin: 3px 0 0;
  font-size: 21px;
  letter-spacing: -0.45px;
}

.eyebrow {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.25px;
}

.safe-badge {
  flex: none;
  padding: 7px 9px;
  border: 1px solid rgba(40, 196, 143, 0.25);
  border-radius: 999px;
  color: var(--green);
  font-size: 11px;
  font-weight: 750;
}

.safe-badge.neutral {
  border-color: rgba(240, 185, 11, 0.25);
  color: var(--yellow);
}

.field-group {
  margin-bottom: 18px;
}

.field-group label {
  display: block;
  margin-bottom: 8px;
  color: #b6bdc7;
  font-size: 12px;
  font-weight: 650;
}

.asset-box,
.text-box,
.standalone-select {
  width: 100%;
  min-height: 62px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--panel-2);
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.asset-box:focus-within,
.text-box:focus-within,
.standalone-select:focus {
  border-color: var(--yellow);
  box-shadow: 0 0 0 3px rgba(240, 185, 11, 0.08);
}

.asset-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  padding: 0 15px;
}

.asset-box input,
.text-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.asset-box input {
  min-width: 0;
  font-size: 25px;
  font-weight: 650;
}

.text-box {
  display: flex;
  align-items: center;
  padding: 0 15px;
}

.text-box input {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
}

.asset-box select {
  max-width: 210px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-weight: 800;
}

.receive-box > span {
  color: var(--text);
  font-size: 23px;
  font-weight: 750;
}

.standalone-select {
  padding: 0 13px;
  color: var(--text);
  outline: 0;
}

.field-hint,
.field-error,
.action-note,
.panel-copy,
.deposit-panel p {
  margin: 7px 2px 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.field-error {
  min-height: 18px;
  color: var(--red);
}

.swap-row {
  position: relative;
  z-index: 2;
  height: 4px;
  text-align: center;
}

.swap-button {
  position: relative;
  top: -23px;
  width: 42px;
  height: 42px;
  border: 5px solid var(--panel);
  border-radius: 13px;
  background: var(--panel-2);
  color: var(--muted);
  font-size: 20px;
  transition: color 150ms ease, transform 150ms ease;
}

.swap-button:hover {
  color: var(--yellow);
  transform: rotate(180deg);
}

.primary-button,
.secondary-button {
  width: 100%;
  min-height: 54px;
  border: 0;
  border-radius: 13px;
  font-weight: 850;
  transition:
    transform 120ms ease,
    filter 120ms ease;
}

.primary-button {
  background: linear-gradient(135deg, var(--yellow), var(--yellow-dark));
  color: #090b0d;
}

.secondary-button {
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
}

.primary-button:hover,
.secondary-button:hover {
  filter: brightness(1.08);
}

.primary-button:active,
.secondary-button:active {
  transform: scale(0.985);
}

.secondary-button.compact {
  min-height: 38px;
  padding: 0 12px;
  font-size: 12px;
}

.quote-area {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.065);
}

.quote-toolbar {
  align-items: center;
  margin-bottom: 12px;
}

.quote-toolbar strong {
  display: block;
  margin-top: 2px;
}

.countdown {
  min-width: 62px;
  padding: 7px 9px;
  border-radius: 9px;
  background: var(--panel-3);
  color: var(--yellow);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  text-align: center;
}

.route-list {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.route-card {
  position: relative;
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 11px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--panel-3);
  cursor: pointer;
}

.route-card.is-selected {
  border-color: var(--yellow);
  box-shadow: 0 0 0 2px rgba(240, 185, 11, 0.08);
}

.route-card input {
  margin: 4px 0 0;
  accent-color: var(--yellow);
}

.route-main,
.route-meta,
.route-fees {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.route-main strong {
  text-transform: capitalize;
}

.route-main span {
  color: var(--green);
  font-size: 17px;
  font-weight: 800;
}

.route-meta,
.route-fees {
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
}

.unavailable-panel {
  margin: 0 0 14px;
  padding: 11px 13px;
  border-radius: 10px;
  background: rgba(146, 154, 165, 0.07);
  color: var(--muted);
  font-size: 12px;
}

.unavailable-panel ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.action-note {
  text-align: center;
}

.two-column {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.panel-copy {
  margin: -8px 0 22px;
  padding: 12px;
  border-left: 3px solid var(--yellow);
  background: rgba(240, 185, 11, 0.055);
}

.order-card {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.065);
}

.icon-button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
}

.status-steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  margin: 20px 0 12px;
}

.status-step {
  height: 4px;
  border-radius: 99px;
  background: var(--panel-2);
}

.status-step.is-done {
  background: var(--green);
}

.order-message {
  margin: 14px 0;
  padding: 12px;
  border: 1px solid rgba(240, 185, 11, 0.18);
  border-radius: 11px;
  background: rgba(240, 185, 11, 0.055);
  color: #d7dbe0;
  font-size: 13px;
  line-height: 1.55;
}

.order-details {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 8px 14px;
  margin: 0;
  font-size: 12px;
}

.order-details dt {
  color: var(--muted);
}

.order-details dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  text-align: right;
}

.deposit-panel {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid rgba(40, 196, 143, 0.25);
  border-radius: 14px;
  background: rgba(40, 196, 143, 0.055);
  text-align: center;
}

.deposit-copy strong,
.deposit-copy code {
  display: block;
}

.deposit-copy strong {
  margin: 7px 0;
  color: var(--green);
  font-size: 23px;
}

.deposit-copy code {
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 11px;
}

.button-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

#deposit-qr {
  width: 176px;
  height: 176px;
  margin: 16px auto 0;
  border: 8px solid #fff;
  border-radius: 8px;
  background: #fff;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  left: 18px;
  z-index: 20;
  width: min(calc(100% - 36px), 460px);
  margin: auto;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #252b32;
  box-shadow: var(--shadow);
  color: var(--text);
  font-size: 13px;
  text-align: center;
}

footer {
  padding: 20px 12px 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
  text-align: center;
}

footer a {
  display: inline-block;
  margin-top: 6px;
  color: var(--yellow);
}

.is-hidden {
  display: none !important;
}

@media (max-width: 560px) {
  .page-shell {
    width: min(100% - 24px, 520px);
    padding: 40px 0 28px;
  }

  .exchange-card {
    border-radius: 20px;
  }

  .view-panel {
    padding: 22px 18px;
  }

  .mode-tab {
    font-size: 12px;
  }

  .asset-box {
    padding: 0 12px;
  }

  .asset-box input,
  .receive-box > span {
    font-size: 21px;
  }

  .asset-box select {
    max-width: 175px;
    font-size: 13px;
  }

  .two-column {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

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