:root {
  color-scheme: dark;
  --ground: #080808;
  --surface: #191919;
  --raised: #252525;
  --line: #353535;
  --subtle-line: #262626;
  --control-border: #73716e;
  --ink: #faf9f6;
  --ink-secondary: #dedbd6;
  --muted: #aaa7a3;
  --quiet: #999590;
  --accent: #f6d4aa;
  --on-accent: #191714;
  --accent-muted: #655747;
  --accent-line: #d7c1a5;
  --focus: #f6d4aa;
  --nav: #080808;
  --positive: var(--accent);
  --negative: #f4b6bd;
  font-family:
    -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC",
    "Microsoft YaHei", sans-serif;
  font-synthesis: none;
  font-size: 14px;
  color: var(--ink);
  background: var(--ground);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  color: inherit;
  background: none;
  border: 0;
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-color: transparent;
}
::selection {
  background: var(--accent);
  color: var(--ground);
}
[hidden] {
  display: none !important;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3,
strong {
  font-weight: 500;
}
h1 {
  font-size: 30px;
  line-height: 1.3;
  letter-spacing: -0.035em;
}
h2 {
  font-size: 16px;
  line-height: 1.5;
}
h3 {
  font-size: 15px;
  line-height: 1.6;
}
p {
  line-height: 1.75;
}
small,
.small {
  font-size: 12px;
}
svg {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
}
.network-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}
.network-context {
  display: flex;
  align-items: center;
  gap: 24px;
}
.return-to-product {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  color: var(--ink);
  white-space: nowrap;
}
.return-to-product svg {
  width: 16px;
  height: 16px;
}
.return-to-product:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}
#connection-state {
  text-align: right;
  white-space: nowrap;
  color: var(--positive);
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 18px;
  line-height: 1.4;
  letter-spacing: -0.02em;
}
.wordmark .mark {
  width: 35px;
  height: 35px;
  padding: 6px;
  border: 1px solid var(--control-border);
  border-radius: 10px;
  color: var(--accent);
}
.wordmark small {
  display: block;
  font-size: 12px;
  line-height: 1.4;
  letter-spacing: 0.09em;
  color: var(--muted);
  margin-top: 3px;
}
.auth-shell {
  width: min(100%, 438px);
  margin: auto;
  padding: 54px 32px 40px;
}
.auth-shell .wordmark {
  margin-bottom: 58px;
}
.auth-intro {
  margin-bottom: 30px;
}
.auth-intro h1 {
  font-size: 30px;
  margin-bottom: 14px;
}
.auth-intro > p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.9;
}
form {
  display: grid;
  gap: 20px;
}
label {
  display: grid;
  gap: 10px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-secondary);
}
input,
textarea,
select {
  width: 100%;
  min-width: 0;
  min-height: 52px;
  padding: 14px 15px;
  border: 1px solid var(--control-border);
  border-radius: 10px;
  color: var(--ink);
  background: var(--surface);
  font-size: 16px;
  line-height: 1.5;
}
input::placeholder,
textarea::placeholder {
  color: var(--quiet);
  font-size: 14px;
  opacity: 1;
}
textarea {
  min-height: 150px;
  resize: vertical;
}
.primary,
.secondary,
.plain {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 16px;
  gap: 12px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
  border-radius: 9px;
}
.primary {
  color: var(--on-accent);
  background: var(--accent);
}
.secondary {
  background: var(--raised);
  color: var(--ink);
  border: 1px solid var(--line);
}
.plain {
  color: var(--accent);
  padding-left: 6px;
  padding-right: 6px;
}
.full {
  width: 100%;
  min-height: 52px;
}
.auth-shell .primary {
  margin-top: 5px;
  justify-content: space-between;
}
.auth-shell .primary span {
  font-size: 21px;
  font-weight: 400;
}
.auth-status {
  font-size: 13px;
  color: var(--positive);
  overflow-wrap: anywhere;
}
.auth-status:empty {
  display: none;
}
.auth-foot {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.network-indicator {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
}
.network-indicator::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--positive);
}
.auth-foot .form-note {
  margin-top: 10px;
  font-size: 12px;
}
.form-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.85;
  overflow-wrap: anywhere;
}
.shell {
  max-width: 1440px;
  margin: auto;
  display: grid;
  grid-template-columns: 226px minmax(0, 1fr);
  min-height: calc(100dvh - 43px);
}
.sidebar {
  padding: 34px 24px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
}
.sidebar .wordmark {
  margin: 0 0 48px;
  font-size: 17px;
}
.sidebar nav {
  display: grid;
  gap: 8px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 48px;
  padding: 12px 16px;
  border-radius: 9px;
  text-align: left;
  color: var(--muted);
  font-size: 14px;
}
.nav-item.active {
  background: var(--raised);
  color: var(--accent);
}
.sidebar-foot {
  font-size: 12px;
  line-height: 1.9;
  color: var(--muted);
  margin-top: auto;
  padding: 64px 16px 0;
  overflow-wrap: anywhere;
}
.mobile-brand {
  display: none;
}
.main {
  min-width: 0;
  padding: 42px 44px 64px;
}
.view-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 32px;
}
.view-title p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
}
.view-title > button {
  flex-shrink: 0;
}
.wallet-overview {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 36px;
  align-items: start;
}
.wallet-primary,
.wallet-activity {
  min-width: 0;
}
.balance {
  padding: 26px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.balance-label {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  color: var(--ink-secondary);
}
.token-symbol {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  background: var(--control-border);
  border-radius: 50%;
  color: var(--accent);
  font-size: 16px;
}
.network-tag {
  font-size: 12px;
  letter-spacing: 0.05em;
  margin-left: auto;
  border: 1px solid var(--line);
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--muted);
}
.balance-value {
  margin: 19px 0 14px;
  font-size: 48px;
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.balance-value small {
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--muted);
  margin-left: 9px;
}
.balance-foot {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.75;
}
.asset-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 20px 0 28px;
  gap: 18px;
}
.asset-grid > div {
  min-width: 0;
}
.asset-grid span {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 9px;
  line-height: 1.6;
}
.asset-grid strong {
  display: block;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  padding: 10px 0;
  min-height: 76px;
  color: var(--ink);
}
.action svg {
  width: 25px;
  height: 25px;
  color: var(--accent);
}
.section-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  min-height: 44px;
  margin: 20px 0 8px;
}
.wallet-activity > .section-title {
  margin-top: 0;
}
.address-value {
  color: var(--ink-secondary);
  font-size: 13px;
  line-height: 1.85;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  overflow-wrap: anywhere;
}
.wallet-primary > .form-note {
  margin-top: 12px;
}
.wallet-activity > .form-note {
  padding-top: 16px;
}
.well {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  max-width: 680px;
  margin-bottom: 24px;
}
.well > h2 {
  margin-bottom: 24px;
}
.well > .address-value {
  font-size: 18px;
  margin: 26px 0 28px;
}
.well > .form-note {
  margin-top: 20px;
}
form .form-note {
  margin-top: -2px;
}
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 680px;
  margin: 24px 0;
}
.tabs {
  display: flex;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
}
.tabs button {
  position: relative;
  min-height: 46px;
  padding: 10px 2px 16px;
  font-size: 13px;
  color: var(--muted);
}
.tabs button.active {
  color: var(--ink);
}
.tabs button.active::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
}
.order-line {
  border-bottom: 1px solid var(--line);
  padding: 22px 0;
  min-width: 0;
}
.order-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.order-header h3 {
  overflow-wrap: anywhere;
  min-width: 0;
  max-width: 65%;
}
.value {
  text-align: right;
  flex: 0 0 auto;
  font-size: 16px;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}
.status-label {
  display: inline-block;
  font-size: 12px;
  font-weight: 400;
  margin-top: 6px;
  color: var(--muted);
}
.status-label.awaiting_approval,
.status-label.approved,
.status-label.broadcast {
  color: #ddc493;
}
.status-label.confirmed {
  color: var(--positive);
}
.status-label.failed,
.status-label.review_required,
.status-label.broadcast_unknown {
  color: var(--negative);
}
.order-line > p {
  font-size: 12px;
  line-height: 1.9;
  color: var(--muted);
  margin-top: 12px;
  overflow-wrap: anywhere;
}
.order-line a,
.journal-row a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 4px;
}
.order-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.order-actions:empty {
  display: none;
}
.empty {
  display: grid;
  align-content: center;
  min-height: 160px;
  padding: 28px;
  text-align: center;
  color: var(--muted);
  line-height: 1.9;
  font-size: 13px;
  border: 1px dashed var(--line);
  border-radius: 12px;
}
.record,
.journal-row {
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.identity {
  min-width: 0;
}
.identity > small {
  display: block;
  color: var(--muted);
  line-height: 1.9;
  margin-top: 10px;
  overflow-wrap: anywhere;
}
.identity > .address-value {
  margin-top: 9px;
}
.journal-row {
  display: flex;
  gap: 24px;
  justify-content: space-between;
}
.journal-row > div {
  min-width: 0;
}
.journal-row p {
  color: var(--muted);
  font-size: 12px;
  margin: 10px 0;
  overflow-wrap: anywhere;
}
.amount {
  white-space: nowrap;
  color: var(--positive);
  font-variant-numeric: tabular-nums;
}
.key-value {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 20px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  line-height: 1.6;
}
.key-value > span {
  color: var(--muted);
}
.key-value strong {
  text-align: right;
  overflow-wrap: anywhere;
}
.settings-section > .form-note {
  margin-bottom: 28px;
}
.banner {
  font-size: 12px;
  line-height: 1.8;
  padding: 14px 18px;
  border: 1px solid #685247;
  border-radius: 10px;
  background: #26221c;
  margin-bottom: 28px;
  color: #e2c6ad;
  overflow-wrap: anywhere;
}
.banner button {
  min-height: 36px;
  color: #edcfb0;
  padding: 8px 0 0;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.error,
.negative,
.order-line > .negative {
  color: var(--negative);
}
.banner.error {
  color: #e2c6ad;
}
.toast {
  position: fixed;
  z-index: 10;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  padding: 14px 20px;
  border: 1px solid var(--control-border);
  border-radius: 12px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 13px;
  max-width: min(90%, 460px);
  width: max-content;
  line-height: 1.7;
  box-shadow: 0 8px 32px #0004;
}
dialog {
  width: min(92%, 440px);
  max-height: 90dvh;
  padding: 28px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--control-border);
  border-radius: 18px;
}
dialog::backdrop {
  background: #000b;
}
.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.dialog-head h2 {
  font-size: 22px;
}
.dialog-head button {
  min-width: 44px;
  height: 44px;
  font-size: 27px;
  color: var(--muted);
}
dialog > p {
  font-size: 13px;
  color: var(--muted);
  overflow-wrap: anywhere;
  margin-bottom: 24px;
}
.loading-shell {
  padding-top: 120px;
}
.loading-shell h1 {
  margin: 28px 0 12px;
  font-size: 25px;
}
.loading-shell p {
  color: var(--muted);
}
.loading-mark {
  width: 32px;
  height: 32px;
  border: 2px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
}
@media (hover: hover) {
  .primary:hover {
    background: var(--accent);
  }
  .secondary:hover,
  .nav-item:hover {
    background: var(--raised);
  }
  .plain:hover,
  .action:hover {
    color: #fff;
  }
}
@media (prefers-reduced-motion: no-preference) {
  button {
    transition:
      background-color 0.18s,
      color 0.18s;
  }
  .loading-mark {
    animation: spin 1s linear infinite;
  }
  @keyframes spin {
    to {
      transform: rotate(360deg);
    }
  }
}
@media (max-width: 1120px) {
  .shell {
    grid-template-columns: 194px minmax(0, 1fr);
  }
  .sidebar {
    padding: 30px 16px;
  }
  .main {
    padding: 34px 28px 60px;
  }
  .wallet-overview {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}
@media (max-width: 760px) {
  .network-bar {
    padding: 0 22px;
    font-size: 12px;
  }
  .network-context {
    gap: 16px;
  }
  .network-asset {
    display: none;
  }
  .auth-shell {
    padding: 38px 26px 32px;
  }
  .auth-shell .wordmark {
    margin-bottom: 46px;
  }
  .auth-intro {
    margin-bottom: 26px;
  }
  .auth-intro h1 {
    font-size: 28px;
  }
  .auth-intro > p {
    font-size: 13px;
  }
  .auth-foot {
    margin-top: 24px;
    padding-top: 20px;
  }
  .mobile-brand {
    display: block;
    padding: 24px 22px 2px;
  }
  .mobile-brand .wordmark {
    font-size: 15px;
    gap: 10px;
  }
  .mobile-brand .wordmark small {
    display: none;
  }
  .mobile-brand .mark {
    width: 30px;
    height: 30px;
    border-radius: 8px;
  }
  .shell {
    display: block;
    min-height: auto;
  }
  .sidebar {
    position: fixed;
    z-index: 5;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0 12px env(safe-area-inset-bottom);
    border: 0;
    border-top: 1px solid var(--line);
    background: var(--surface);
  }
  .sidebar > .wordmark,
  .sidebar-foot {
    display: none;
  }
  .sidebar nav {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
  }
  .nav-item {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    padding: 12px 4px 10px;
    min-height: 68px;
    border-radius: 0;
    font-size: 12px;
  }
  .nav-item.active {
    background: none;
    color: var(--accent);
  }
  .nav-item svg {
    width: 20px;
    height: 20px;
  }
  .main {
    padding: 28px 22px 108px;
  }
  .view-title {
    margin-bottom: 26px;
    gap: 10px;
  }
  .view-title h1 {
    font-size: 26px;
  }
  .view-title p {
    font-size: 12px;
  }
  .view-title > .plain {
    font-size: 12px;
  }
  .wallet-overview {
    gap: 24px;
  }
  .balance {
    padding: 22px;
    border-radius: 14px;
  }
  .balance-value {
    font-size: 42px;
  }
  .asset-grid {
    margin: 20px 0 22px;
    gap: 12px;
  }
  .asset-grid span {
    font-size: 12px;
  }
  .asset-grid strong {
    font-size: 14px;
  }
  .well {
    padding: 22px 20px;
  }
  .well > .address-value {
    font-size: 16px;
  }
  .button-row {
    gap: 8px;
  }
  .button-row > button {
    flex: 1;
    padding: 11px 10px;
    white-space: nowrap;
    font-size: 12px;
  }
  .order-header {
    gap: 12px;
  }
  .order-header h3 {
    font-size: 14px;
    max-width: 55%;
  }
  .value {
    font-size: 14px;
  }
  .banner {
    padding: 12px 14px;
    margin-bottom: 24px;
  }
  .toast {
    bottom: 86px;
  }
  dialog {
    padding: 22px;
  }
  .journal-row {
    display: block;
  }
  .journal-row .amount {
    display: block;
    margin-top: 14px;
  }
}
@media (max-width: 340px) {
  .network-bar {
    padding-left: 16px;
    padding-right: 16px;
    gap: 8px;
  }
  .auth-shell {
    padding: 32px 20px 28px;
  }
  .auth-shell .wordmark {
    margin-bottom: 36px;
  }
  .main,
  .mobile-brand {
    padding-left: 16px;
    padding-right: 16px;
  }
  .balance {
    padding: 18px;
  }
  .balance-value {
    font-size: 38px;
  }
  .well {
    padding: 20px 16px;
  }
}

/* Long merchant notes remain available without burying order actions. */
.order-note {
  margin-top: 12px;
  font-size: 12px;
  color: var(--muted);
}
.order-note summary {
  cursor: pointer;
  min-height: 32px;
  width: max-content;
  padding: 6px 0;
  color: var(--accent);
}
.order-note p {
  overflow-wrap: anywhere;
  padding: 8px 0;
  line-height: 1.9;
}
.banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.banner p {
  line-height: 1.8;
}
.banner button {
  padding: 4px 0;
  flex: 0 0 auto;
}
input,
textarea {
  caret-color: var(--accent);
}
* {
  scrollbar-width: thin;
  scrollbar-color: var(--control-border) var(--ground);
}
@media (max-width: 760px) {
  .banner {
    align-items: flex-start;
  }
  .banner button {
    min-height: 32px;
    padding: 0;
  }
}

/* Merchant-owned wallet: onboarding, funds, and payment tasks. */
.auth-layout {
  max-width: 1040px;
  margin: 0 auto;
  padding: 62px 44px 58px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
  gap: 84px;
  align-items: start;
}
.auth-explanation {
  min-width: 0;
}
.auth-explanation > .wordmark {
  margin-bottom: 48px;
}
.auth-explanation > h1 {
  font-size: 39px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: -0.035em;
}
.auth-explanation > p {
  font-size: 14px;
  color: var(--muted);
  margin-top: 20px;
  max-width: 32ch;
  line-height: 1.9;
}
.setup-path {
  list-style: none;
  margin: 30px 0 0;
  padding: 0;
  counter-reset: setup;
  display: grid;
  gap: 20px;
}
.setup-path li {
  position: relative;
  padding-left: 37px;
  counter-increment: setup;
}
.setup-path li:before {
  content: counter(setup);
  position: absolute;
  left: 0;
  top: 1px;
  width: 23px;
  height: 23px;
  border: 1px solid var(--control-border);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  color: var(--ink-secondary);
}
.setup-path strong {
  display: block;
  font-size: 13px;
  font-weight: 400;
}
.setup-path span {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 5px;
  line-height: 1.8;
}
.auth-form-panel {
  min-width: 0;
  padding: 20px 0 0;
}
.auth-form-panel > h2 {
  font-size: 23px;
  font-weight: 400;
  letter-spacing: -0.02em;
}
.auth-form-panel > .form-note {
  margin: 12px 0 28px;
}
.auth-form-panel form {
  gap: 22px;
}
.auth-form-panel .primary {
  justify-content: space-between;
  margin-top: 8px;
}
.auth-form-panel .primary svg {
  width: 18px;
  height: 18px;
}
.auth-key-note {
  font-size: 12px;
  line-height: 1.9;
  color: var(--muted);
  padding-top: 22px;
  border-top: 1px solid var(--line);
  margin-top: 26px;
}
.view-title {
  margin-bottom: 24px;
}
.view-title h1 {
  font-weight: 400;
}
.banner {
  padding: 12px 16px;
  margin-bottom: 26px;
  gap: 24px;
}
.banner > div {
  display: flex;
  gap: 18px;
  flex-shrink: 0;
}
.banner button {
  font-size: 12px;
}
.workbench {
  display: grid;
  grid-template-columns: minmax(0, 0.94fr) minmax(0, 1.06fr);
  gap: 32px;
  align-items: start;
}
.funds-panel {
  min-width: 0;
  padding: 26px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.funds-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.funds-heading > h2 {
  font-size: 14px;
  font-weight: 400;
}
.funds-heading .network-tag {
  margin: 0;
  font-size: 12px;
}
.funds-panel .balance-value {
  font-size: 48px;
  margin: 24px 0 14px;
  font-weight: 400;
}
.funds-metrics {
  margin-top: 25px;
}
.funds-metrics .key-value {
  font-size: 12px;
}
.funds-metrics .key-value strong {
  font-size: 13px;
}
.funds-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
  flex-wrap: wrap;
}
.funds-actions > button {
  flex: 1;
  white-space: nowrap;
  padding: 10px 12px;
  min-height: 44px;
  font-size: 12px;
}
.funds-actions svg {
  width: 17px;
  height: 17px;
}
.funds-actions > .plain {
  flex: 0 0 auto;
}
.wallet-address {
  border-top: 1px solid var(--line);
  margin-top: 24px;
  padding-top: 18px;
}
.wallet-address > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}
.wallet-address h2 {
  font-size: 13px;
  font-weight: 400;
}
.wallet-address > .address-value {
  font-size: 12px;
  margin-top: 8px;
}
.wallet-address > .form-note {
  margin-top: 10px;
}
.queue-panel {
  min-width: 0;
}
.queue-panel > .section-title {
  margin: 0 0 8px;
}
.queue-panel h2 {
  font-size: 17px;
  font-weight: 400;
}
.queue-panel .section-title > div > .form-note {
  margin-top: 7px;
}
.queue-note {
  font-size: 12px;
  line-height: 1.9;
  color: var(--muted);
  margin-top: 20px;
}
.queue-panel .order-line {
  padding-top: 20px;
}
.queue-panel .empty {
  margin-top: 24px;
  min-height: 190px;
}
.payment-mode {
  display: flex;
  gap: 28px;
  margin-bottom: 30px;
  border-bottom: 1px solid var(--line);
}
.payment-mode button {
  padding: 8px 0 16px;
  min-height: 48px;
  font-size: 14px;
  color: var(--muted);
  border-bottom: 2px solid transparent;
}
.payment-mode button[aria-pressed="true"] {
  color: var(--ink);
  border-bottom-color: var(--accent);
}
.payment-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 265px;
  gap: 44px;
  max-width: 1000px;
}
.payment-editor {
  min-width: 0;
}
.payment-editor form {
  gap: 24px;
}
.payment-guide {
  min-width: 0;
  border-left: 1px solid var(--line);
  padding-left: 28px;
}
.payment-guide h2 {
  font-size: 16px;
  font-weight: 400;
  margin-bottom: 15px;
}
.payment-guide ol {
  list-style: none;
  padding: 0;
  margin: 26px 0;
  counter-reset: pay;
}
.payment-guide li {
  position: relative;
  padding-left: 29px;
  counter-increment: pay;
  margin-top: 23px;
}
.payment-guide li:before {
  content: counter(pay);
  position: absolute;
  left: 0;
  top: 0;
  font-size: 12px;
  color: var(--muted);
}
.payment-guide li strong {
  font-size: 12px;
  font-weight: 400;
  display: block;
}
.payment-guide li span {
  font-size: 12px;
  color: var(--muted);
  display: block;
  line-height: 1.85;
  margin-top: 6px;
}
.payment-guide > .plain {
  display: flex;
  justify-content: flex-start;
  margin-top: 5px;
}
.payment-guide .key-value {
  font-size: 12px;
  gap: 12px;
}
.amount-field {
  position: relative;
  grid-template-columns: 1fr auto;
  align-items: baseline;
}
.amount-field input {
  grid-column: 1/-1;
  font-size: 28px;
  min-height: 76px;
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
}
.amount-field input::placeholder {
  font-size: 28px;
}
.field-unit {
  font-size: 12px;
  color: var(--muted);
}
.payment-editor label:has(.optional-label) {
  grid-template-columns: 1fr auto;
}
.payment-editor label:has(.optional-label) > input {
  grid-column: 1/-1;
}
.optional-label {
  font-size: 12px;
  color: var(--muted);
}
.reference-details {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 5px 0;
}
.reference-details summary {
  cursor: pointer;
  font-size: 12px;
  color: var(--muted);
  min-height: 44px;
  padding: 12px 0;
}
.reference-details label {
  margin: 12px 0;
  font-size: 12px;
}
.reference-details .form-note {
  padding: 0 0 14px;
}
.payment-submit {
  display: grid;
  gap: 14px;
}
.payment-submit > .form-note {
  font-size: 12px;
}
.mobile-brand {
  padding-bottom: 0;
}
.sidebar .wordmark small {
  font-size: 12px;
}
.banner .error {
  color: var(--negative);
}
@media (max-width: 1180px) {
  .workbench {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .funds-panel {
    max-width: none;
  }
  .payment-layout {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .payment-guide {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 25px 0 0;
  }
  .payment-guide ol {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin: 22px 0;
  }
  .payment-guide li {
    margin: 0;
    padding-left: 22px;
  }
  .payment-guide > .plain {
    display: inline-flex;
    margin-right: 20px;
  }
  .auth-layout {
    gap: 48px;
    padding: 50px 36px;
  }
  .auth-explanation > h1 {
    font-size: 35px;
  }
}
@media (max-width: 760px) {
  .auth-layout {
    display: block;
    padding: 30px 26px 34px;
    max-width: 440px;
  }
  .auth-explanation > .wordmark {
    margin-bottom: 32px;
  }
  .auth-explanation > h1 {
    font-size: 28px;
    line-height: 1.4;
  }
  .auth-explanation > p {
    font-size: 13px;
    max-width: none;
    margin-top: 14px;
  }
  .setup-path {
    display: none;
  }
  .auth-form-panel {
    padding: 28px 0 0;
  }
  .auth-form-panel > h2 {
    font-size: 18px;
  }
  .auth-form-panel > .form-note {
    margin: 9px 0 22px;
  }
  .auth-form-panel form {
    gap: 20px;
  }
  .auth-key-note {
    font-size: 12px;
    margin-top: 24px;
    padding-top: 20px;
  }
  .view-title {
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 22px;
  }
  .view-title h1 {
    font-size: 25px;
  }
  .view-title .primary {
    font-size: 12px;
    min-height: 40px;
    padding: 10px 13px;
    flex-shrink: 0;
  }
  .banner {
    gap: 12px;
    display: block;
    padding: 11px 14px;
    margin-bottom: 24px;
  }
  .banner > div {
    margin-top: 7px;
    gap: 20px;
  }
  .banner button {
    min-height: 30px;
  }
  .funds-panel {
    padding: 22px 20px;
  }
  .funds-panel .balance-value {
    font-size: 42px;
  }
  .funds-heading > h2 {
    font-size: 13px;
  }
  .funds-actions {
    gap: 8px;
  }
  .funds-actions > button {
    padding: 10px;
  }
  .funds-actions > .plain {
    flex: 1;
  }
  .queue-panel > .section-title {
    align-items: flex-start;
  }
  .queue-panel .section-title > .plain {
    padding-top: 0;
    min-height: 36px;
  }
  .payment-mode {
    margin-bottom: 26px;
  }
  .payment-guide ol {
    display: block;
    margin: 24px 0;
  }
  .payment-guide li {
    margin-top: 20px;
  }
  .amount-field input {
    font-size: 27px;
    min-height: 72px;
  }
  .amount-field input::placeholder {
    font-size: 27px;
  }
}
@media (max-width: 340px) {
  .auth-layout {
    padding: 26px 20px 30px;
  }
  .auth-explanation > .wordmark {
    margin-bottom: 26px;
  }
  .auth-explanation > h1 {
    font-size: 26px;
  }
  .auth-form-panel {
    padding-top: 24px;
  }
  .view-title {
    gap: 10px;
  }
  .view-title h1 {
    font-size: 23px;
  }
  .view-title .primary {
    padding: 10px;
    font-size: 12px;
  }
  .funds-panel {
    padding: 20px 16px;
  }
  .funds-actions > button {
    font-size: 12px;
    gap: 6px;
    padding: 10px 7px;
  }
  .funds-actions svg {
    width: 15px;
    height: 15px;
  }
}

/* Recipient inspection follows the payment task, including on narrow screens. */
.has-recipient-check {
  grid-template-columns: minmax(0, 1fr) minmax(265px, 320px);
}
#recipient-mobile-slot:empty,
#recipient-desktop-slot:empty {
  display: none;
}
.recipient-check {
  min-width: 0;
  margin-bottom: 30px;
  padding-bottom: 25px;
  border-bottom: 1px solid var(--line);
}
.recipient-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.recipient-heading h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
}
.recipient-heading .plain,
.recipient-address .plain {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 6px 0;
  font-size: 12px;
}
.recipient-summary {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}
.recipient-address {
  margin-top: 12px;
}
.recipient-address p {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.7;
  overflow-wrap: anywhere;
  user-select: all;
}
.recipient-address .plain {
  min-height: 36px;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.recipient-account {
  display: grid;
  gap: 10px;
  margin: 14px 0 0;
  font-size: 12px;
}
.recipient-account > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.recipient-account dt {
  color: var(--muted);
  flex-shrink: 0;
}
.recipient-account dd {
  margin: 0;
  text-align: right;
  overflow-wrap: anywhere;
}
.recipient-notice {
  margin-top: 15px;
  padding-left: 11px;
  border-left: 2px solid #b5aaa0;
  color: #d9cec3;
  font-size: 12px;
  line-height: 1.85;
  overflow-wrap: anywhere;
}
.recipient-check .is-error {
  color: var(--negative);
}
.recipient-notice.is-error {
  border-left-color: var(--negative);
}
.recipient-history {
  margin-top: 18px;
  border-top: 1px solid var(--line);
}
.recipient-history summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 10px 0;
  cursor: pointer;
  list-style: none;
  font-size: 12px;
}
.recipient-history summary::-webkit-details-marker {
  display: none;
}
.recipient-history summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.recipient-history-toggle::after {
  content: "展开 ＋";
  white-space: nowrap;
  color: var(--muted);
}
.recipient-history[open] .recipient-history-toggle::after {
  content: "收起 −";
}
.recipient-transfers {
  max-height: 440px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--control-border) transparent;
  overscroll-behavior: contain;
}
.recipient-transfer {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.recipient-transfer:first-child {
  padding-top: 6px;
}
.recipient-transfer-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}
.recipient-direction {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.recipient-transfer-heading strong {
  min-width: 0;
  text-align: right;
  font-size: 15px;
  font-weight: 450;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.recipient-transfer-heading small {
  font-size: 10px;
  color: var(--muted);
}
.recipient-counterparty {
  margin-top: 8px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.recipient-counterparty span {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.recipient-transfer-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 7px;
  font-size: 10px;
  color: var(--muted);
  line-height: 1.8;
}
.recipient-transfer-foot a {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.recipient-scope,
.recipient-checked,
.recipient-disclaimer {
  margin-top: 12px;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.85;
  overflow-wrap: anywhere;
}
.recipient-checked {
  font-variant-numeric: tabular-nums;
}
.recipient-disclaimer {
  margin-top: 15px;
}
@media (max-width: 1180px) {
  .has-recipient-check {
    grid-template-columns: 1fr;
  }
  #recipient-mobile-slot .recipient-check {
    margin: -8px 0 0;
    padding: 14px 0 18px;
    border-top: 1px solid var(--line);
  }
  .recipient-address {
    display: flex;
    align-items: center;
    gap: 16px;
  }
  .recipient-address p {
    min-width: 0;
  }
  .recipient-transfers {
    max-height: 360px;
  }
}
@media (max-width: 340px) {
  .recipient-address {
    display: block;
  }
  .recipient-history summary {
    gap: 8px;
  }
  .recipient-account > div {
    gap: 8px;
  }
}

/* Login and visitor entry share the same wallet presentation. */
.auth-layout.auth-entry {
  min-height: calc(100svh - 44px);
  align-content: center;
  padding-block: 58px;
}
.auth-entry .auth-explanation > .wordmark { margin-bottom: 40px; }
.auth-entry .auth-explanation > h1 { font-size: clamp(32px, 3.5vw, 46px); }
.auth-entry .auth-form-panel { padding-top: 0; }
.auth-entry .auth-form-panel > .form-note { margin-bottom: 24px; }
.auth-options {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 12px;
}
.auth-options button { min-height: 40px; text-underline-offset: 4px; }
.auth-options button:hover { color: var(--ink); text-decoration: underline; }
.guest-entry {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  margin-top: 14px;
  padding: 13px 20px;
  border: 1px solid var(--control-border);
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
}
.guest-entry:hover { background: var(--raised); border-color: var(--focus); }
.auth-guest-note { margin-top: 10px; text-align: center; font-size: 12px; color: var(--muted); line-height: 1.7; }
.guest-session-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 28px;
  border-bottom: 1px solid var(--line);
  background: var(--nav);
  font-size: 12px;
  color: var(--ink-secondary);
}
.guest-session-bar > span { line-height: 1.6; }
.guest-session-bar button { flex: 0 0 auto; min-height: 36px; padding: 4px 0; color: var(--ink); font-size: 12px; }
.guest-home > .view-title { max-width: 860px; margin-bottom: 36px; }
.guest-login { color: var(--muted); }
.guest-overview { max-width: 860px; }
.guest-shortcuts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 24px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}
.guest-shortcuts > button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  min-width: 0;
  padding: 8px 4px;
  font-size: 14px;
}
.shortcut-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--raised);
  color: var(--accent);
}
.guest-shortcuts > button:first-child .shortcut-icon {
  background: var(--accent);
  color: var(--ground);
}
.guest-shortcuts > button:hover .shortcut-icon { box-shadow: 0 0 0 1px var(--focus); }
.guest-drafts { margin-top: 36px; }
.guest-drafts > .section-title { margin: 0; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.guest-drafts h2 { display: flex; align-items: baseline; gap: 10px; }
.guest-draft-count { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.guest-drafts .plain { min-height: 44px; color: var(--muted); }
.guest-empty { display: grid; justify-items: center; gap: 14px; padding: 62px 20px; color: var(--muted); font-size: 13px; }
.guest-empty > svg { width: 28px; height: 28px; opacity: 0.6; }
.guest-draft-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; width: 100%; padding: 22px 0; border-bottom: 1px solid var(--line); text-align: left; }
.guest-draft-row:hover { background: var(--surface); }
.guest-draft-name { min-width: 0; }
.guest-draft-name strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.guest-draft-row small { display: block; margin-top: 6px; color: var(--muted); font-size: 12px; }
.guest-draft-amount { flex-shrink: 0; text-align: right; font-variant-numeric: tabular-nums; }
.status-label.draft { color: var(--ink-secondary); }
@media (max-width: 760px) {
  .auth-layout.auth-entry {
    min-height: auto;
    padding: 26px 26px 30px;
  }
  .auth-entry .auth-explanation > .wordmark { margin-bottom: 24px; }
  .auth-entry .auth-explanation > h1 { font-size: 28px; line-height: 1.3; }
  .auth-entry .auth-explanation > p { margin-top: 10px; font-size: 13px; }
  .auth-entry .auth-form-panel { padding-top: 26px; }
  .auth-entry .auth-form-panel > h2 { font-size: 16px; }
  .auth-entry .auth-form-panel > .form-note { margin-top: 6px; margin-bottom: 18px; }
  .auth-entry .auth-form-panel form { gap: 16px; }
  .auth-entry .auth-form-panel .primary { min-height: 48px; margin-top: 4px; }
  .auth-entry .guest-entry { min-height: 48px; margin-top: 12px; }
  .auth-options { margin-top: 10px; }
  .guest-session-bar { padding: 6px 22px; gap: 8px; }
  .guest-home { padding-top: 30px; }
  .guest-home > .view-title { margin-bottom: 28px; }
  .guest-shortcuts { padding: 19px 8px; }
  .guest-shortcuts > button { gap: 13px; font-size: 13px; }
  .guest-drafts { margin-top: 28px; }
}
@media (max-width: 340px) {
  .auth-layout.auth-entry { padding-inline: 20px; }
  .guest-session-bar { padding-inline: 16px; }
  .guest-session-bar button { font-size: 11px; }
}
.auth-entry .auth-form-panel > h2 { margin-bottom: 20px; }
.main > .guest-session-bar {
  margin: -8px 0 22px;
  padding: 0 0 10px;
  background: transparent;
}
