:root {
  --bg: #efede8;
  --panel: #fbfaf7;
  --panel-border: rgb(23 22 20 / 16%);
  --text: #171614;
  --muted: #5f5a50;
  --accent: #171614;
  --accent-soft: #d9d4ca;
  --danger: #a33e2a;
  --success: #215b38;
  --warning: #8a6116;
  --shadow: 0 10px 30px rgb(31 24 13 / 7%);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: 'IBM Plex Sans', 'Segoe UI', sans-serif;
  font-size: 14px;
  background: linear-gradient(180deg, #f5f3ee 0%, var(--bg) 100%);
}

button,
input,
select {
  font: inherit;
}

.app-shell {
  max-width: 1240px;
  margin: 0 auto;
  padding: 22px 18px 32px;
}

.header-panel,
.nav-panel,
.workspace-panel {
  border: 1px solid var(--panel-border);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.header-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
}

.nav-panel {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  padding: 10px 12px;
}

.workspace-panel {
  margin-top: 20px;
  padding: 18px;
}

.app-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.75rem;
}

.footer-label {
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.footer-commit {
  padding: 0.18rem 0.4rem;
  border: 1px solid rgb(23 22 20 / 10%);
  color: var(--text);
  background: rgb(255 255 255 / 55%);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.76rem;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.wallet-box {
  display: flex;
  align-items: center;
  gap: 8px;
}

.copy-button-wrap {
  position: relative;
  display: inline-flex;
}

.brand {
  font-family: 'Space Grotesk', 'IBM Plex Sans', sans-serif;
  font-size: clamp(1.3rem, 3vw, 1.7rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.network-select,
.field input,
.field select {
  width: 100%;
  padding: 0.65rem 0.7rem;
  border: 1px solid var(--panel-border);
  border-radius: 0;
  color: var(--text);
  background: #fff;
}

.network-select,
.field input:not([type='range']),
.address-display {
  min-height: 42px;
}

.network-select {
  width: 132px;
  min-height: 36px;
}

.subtle-text,
.panel-caption,
.balance-meta {
  color: var(--muted);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.wallet-status {
  max-width: 140px;
  color: var(--muted);
  font-size: 0.85rem;
  text-align: right;
  line-height: 1.4;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--panel-border);
  color: var(--muted);
  background: #fff;
  cursor: pointer;
}

.icon-button svg {
  width: 14px;
  height: 14px;
}

.icon-button:hover {
  color: var(--text);
  background: #efe9de;
}

.copy-tooltip {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 10;
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--panel-border);
  color: #faf7f1;
  background: var(--accent);
  font-size: 0.75rem;
  line-height: 1;
  white-space: nowrap;
  box-shadow: var(--shadow);
}

.wallet-button,
.primary-button,
.secondary-button,
.tab-button {
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition:
    background-color 120ms ease,
    border-color 120ms ease;
}

.wallet-button,
.primary-button {
  padding: 0.65rem 0.9rem;
  border-radius: 0;
  color: #faf7f1;
  background: var(--accent);
  min-height: 36px;
}

.wallet-action-button {
  width: 118px;
  justify-content: center;
}

.secondary-button {
  padding: 0.65rem 0.9rem;
  border-radius: 0;
  color: var(--text);
  background: transparent;
  border-color: var(--panel-border);
}

.wallet-button:disabled,
.primary-button:disabled,
.secondary-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.tab-button {
  display: inline-flex;
  padding: 0.65rem 0.85rem;
  border-radius: 0;
  color: var(--muted);
  background: #fff;
  border-color: var(--panel-border);
  text-decoration: none;
}

.tab-button.is-active {
  color: var(--text);
  background: var(--accent-soft);
}

.tab-button.is-disabled {
  color: var(--muted);
  background: #f4f0e8;
  border-color: rgb(23 22 20 / 10%);
  cursor: not-allowed;
  opacity: 0.65;
}

.wallet-button:hover,
.primary-button:hover,
.secondary-button:hover {
  background: #2b2925;
}

.secondary-button:hover,
.tab-button:hover {
  background: #efe9de;
}

.panel {
  padding: 18px;
  border: 1px solid var(--panel-border);
  border-radius: 0;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.panel-header h2 {
  margin: 0;
  font-family: 'Space Grotesk', 'IBM Plex Sans', sans-serif;
  font-size: 1rem;
}

.title-with-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.48rem;
  border-radius: 999px;
  font-size: 0.72rem;
  line-height: 1;
  white-space: nowrap;
}

.status-badge.is-paused {
  color: #8e4b5f;
  background: #f5dbe4;
}

.panel-lead {
  margin: 12px 0 0;
  max-width: 62ch;
  color: var(--muted);
  line-height: 1.45;
  font-size: 0.9rem;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
}

.loan-action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-left: auto;
}

.loan-action-button.is-repay {
  border-color: rgb(108 154 122 / 35%);
  background: rgb(126 173 140 / 16%);
  color: rgb(45 94 59);
}

.loan-action-button.is-liquidate {
  border-color: rgb(185 118 118 / 34%);
  background: rgb(201 129 129 / 16%);
  color: rgb(126 52 52);
}

.loan-action-button.is-repay:hover:not(:disabled),
.loan-action-button.is-repay:focus-visible:not(:disabled) {
  background: rgb(126 173 140 / 24%);
}

.loan-action-button.is-liquidate:hover:not(:disabled),
.loan-action-button.is-liquidate:focus-visible:not(:disabled) {
  background: rgb(201 129 129 / 24%);
}

.pagination-row {
  align-items: center;
  justify-content: space-between;
}

.registration-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
}

.registration-banner-copy {
  min-width: 0;
}

.registration-detail {
  margin-top: 4px;
  font-size: 0.82rem;
  line-height: 1.45;
}

.registration-transaction {
  margin-top: 10px;
}

.registration-signature {
  display: inline-block;
  margin-left: 8px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.78rem;
  word-break: break-all;
}

.panel-message {
  margin: 14px 0;
  padding: 10px 12px;
  border-radius: 0;
}

.dismissible-message {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.panel-message.is-error {
  color: var(--danger);
  background: rgb(163 62 42 / 9%);
}

.panel-message.is-success {
  color: var(--success);
  background: rgb(33 91 56 / 9%);
}

.panel-message.is-warning {
  color: var(--warning);
  background: rgb(138 97 22 / 10%);
}

.panel-message-subtle {
  margin-top: 6px;
  font-size: 0.88rem;
  opacity: 0.8;
}

.transaction-notice {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid rgb(23 22 20 / 8%);
  background: #fff;
}

.transaction-notice-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.transaction-notice-meta {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}

.transaction-notice-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.transaction-notice-label {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.transaction-notice-signature {
  overflow-wrap: anywhere;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.82rem;
  line-height: 1.45;
}

.transaction-notice-link {
  color: #2b63b8;
  text-decoration: none;
  cursor: pointer;
}

.transaction-notice-link:hover,
.transaction-notice-link:focus-visible {
  color: #4a7ecb;
}

.transaction-notice-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.3rem;
  height: 1.3rem;
  margin-top: 0.1rem;
  border-radius: 999px;
  flex: 0 0 auto;
  font-size: 0.9rem;
  line-height: 1;
}

.transaction-notice-icon.is-pending {
  color: var(--muted);
  background: rgb(23 22 20 / 6%);
}

.transaction-notice-icon.is-success {
  color: rgb(36 102 58);
  background: rgb(129 186 146 / 18%);
}

.transaction-notice-icon.is-error {
  color: rgb(142 58 58);
  background: rgb(213 142 142 / 18%);
}

.transaction-spinner {
  width: 0.78rem;
  height: 0.78rem;
  border: 2px solid rgb(23 22 20 / 18%);
  border-top-color: rgb(23 22 20 / 62%);
  border-radius: 999px;
  animation: transaction-spin 0.9s linear infinite;
}

.transaction-notice-close {
  padding: 0;
  border: 0;
  color: #8f8a81;
  font-size: 1rem;
  line-height: 1;
  background: transparent;
  cursor: pointer;
}

.transaction-notice-close:hover,
.transaction-notice-close:focus-visible {
  color: var(--text);
}

.transaction-notice-trace {
  margin-top: 12px;
  padding: 10px 12px;
  color: rgb(126 52 52);
  background: rgb(201 129 129 / 10%);
  overflow: auto;
}

.transaction-notice-trace pre {
  margin: 0;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.76rem;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

@keyframes transaction-spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.launch-config-detail {
  color: var(--muted);
  font-size: 0.9rem;
}

.launch-config-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.4rem;
  height: 1.4rem;
  border-radius: 999px;
  font-size: 0.9rem;
  line-height: 1;
}

.launch-config-status.is-active {
  color: rgb(36 102 58);
  background: rgb(129 186 146 / 18%);
}

.launch-config-status.is-paused {
  color: rgb(142 58 58);
  background: rgb(213 142 142 / 18%);
}

.launch-config-note {
  margin-top: 12px;
}

.address-inline {
  overflow-wrap: anywhere;
}

.debug-address-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.debug-address-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.debug-address-label {
  color: var(--muted);
  font-size: 0.8rem;
}

.debug-address-value {
  overflow-wrap: anywhere;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.8rem;
}

.empty-state.compact {
  margin-top: 8px;
  padding: 10px 12px;
}

.message-close {
  padding: 0;
  border: 0;
  color: currentcolor;
  font-size: 1rem;
  line-height: 1;
  background: transparent;
  cursor: pointer;
}

.balance-list {
  margin-top: 18px;
}

.vault-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.launch-list {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.profile-account-section {
  margin-top: 18px;
}

.profile-account-row {
  align-items: flex-start;
}

.profile-account-value {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.address-value-with-link {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.explorer-link-button {
  text-decoration: none;
}



.vault-card {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 14px;
  border: 1px solid rgb(23 22 20 / 8%);
  color: var(--text);
  text-decoration: none;
  background: #fff;
}

.vault-card:hover {
  background: #f3eee5;
}

.vault-card-header {
  min-width: 0;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.84rem;
  line-height: 1.45;
}

.vault-card-address {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vault-card-meta,
.vault-card-meta-row {
  min-width: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.vault-card-header strong,
.vault-card-meta,
.vault-card-meta-row,
.middle-ellipsis {
  display: block;
  min-width: 0;
}

.vault-card-meta-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  align-items: center;
  column-gap: 12px;
}

.vault-card-address-value {
  display: flex;
  justify-content: flex-end;
  min-width: 0;
  text-align: right;
}

.middle-ellipsis {
  display: flex;
  align-items: baseline;
  min-width: 0;
  max-width: 100%;
  white-space: nowrap;
}

.middle-ellipsis-head {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.middle-ellipsis-tail {
  flex: 0 0 auto;
  white-space: nowrap;
}

.vault-card-divider {
  height: 1px;
  margin: 2px 0 4px;
  background: rgb(23 22 20 / 10%);
}

.vault-card-grid,
.vault-detail-grid {
  display: grid;
  gap: 10px;
  align-items: start;
}

.vault-card-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 24px;
  color: var(--text);
  font-size: 0.82rem;
}

.vault-card-metric {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  column-gap: 12px;
  min-width: 0;
}

.vault-card-metric-label {
  min-width: 0;
  color: var(--muted);
}

.vault-card-metric-value {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.vault-detail-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 18px;
}

.balance-row,
.status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.balance-row {
  padding: 14px 0;
  border-top: 1px solid rgb(23 22 20 / 8%);
}

.balance-label,
.balance-value {
  font-weight: 600;
}

.balance-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.balance-send-button {
  min-height: 32px;
  padding: 0.45rem 0.8rem;
}

.empty-state,
.status-card,
.tx-card {
  margin-top: 18px;
  padding: 14px;
  border-radius: 0;
  background: #fff;
  border: 1px solid rgb(23 22 20 / 8%);
}

.loan-ticks-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.status-card {
  display: grid;
  gap: 12px;
}

.tx-card {
  display: grid;
  gap: 8px;
}

.tx-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.tx-label,
.address-field-label,
.field span {
  color: var(--muted);
  font-size: 0.8rem;
}

.tx-signature,
.address-display,
.address-value {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.82rem;
  line-height: 1.45;
  word-break: break-all;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: rgb(23 22 20 / 32%);
}

.modal-shell {
  position: fixed;
  inset: 0;
  z-index: 21;
  display: grid;
  place-items: center;
  padding: 18px;
}

.modal-card {
  width: min(100%, 520px);
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--panel-border);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.profile-tools-section {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid rgb(23 22 20 / 10%);
}

.position-section {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid rgb(23 22 20 / 10%);
}

.launch-form-section {
  margin-top: 24px;
  padding-top: 0;
  border-top: 0;
}

.preset-section-title {
  margin: 0 0 14px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.preset-group {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid rgb(23 22 20 / 10%);
  border-radius: 8px;
  background: #fff;
}

.preset-group > .preset-section-title {
  margin-top: 0;
}

.preset-group + .preset-group {
  margin-top: 14px;
}

.preset-group > .address-field-list {
  margin-top: 0;
}

.preset-group > .preset-fields {
  margin-top: 0;
}

.preset-mint-field {
  display: flex;
  align-items: center;
  gap: 8px;
}

.preset-mint-field > span:first-child {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.preset-key-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.preset-mint-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.preset-mint-actions > .secondary-button {
  flex: 1;
  min-width: 0;
}

.preset-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.preset-icon-button > svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.preset-key-icon {
  width: 16px;
  height: 16px;
}

.preset-key-icon.is-present {
  color: var(--success);
}

.preset-key-icon.is-missing {
  color: var(--muted);
}

.preset-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.preset-fields > li {
  flex: 1 1 240px;
  min-width: 0;
  max-width: 100%;
}

.preset-field-spacer {
  display: none;
}

@media (min-width: 560px) {
  .preset-field-spacer {
    display: block;
  }
}

.position-paginator {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  padding-bottom: 4px;
  overflow-x: auto;
}

.position-pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--panel-border);
  color: var(--muted);
  background: #fff;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease;
}

.position-pill:hover,
.position-pill:focus-visible {
  border-color: rgb(23 22 20 / 18%);
  background: #f3eee5;
  color: var(--text);
}

.position-pill.is-active {
  color: var(--text);
  background: var(--accent-soft);
}

.position-form-card {
  display: grid;
  gap: 14px;
  margin-top: 18px;
  padding: 16px;
  border: 1px solid rgb(23 22 20 / 8%);
  background: #fff;
}

.position-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.position-form-column {
  display: grid;
  align-content: start;
  align-items: start;
  grid-auto-rows: min-content;
  gap: 14px;
  min-width: 0;
}

.position-subtabs {
  display: flex;
  gap: 10px;
  padding-bottom: 4px;
  overflow-x: auto;
}

.position-subtab {
  flex: 0 0 auto;
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--panel-border);
  color: var(--muted);
  background: #fff;
  cursor: pointer;
}

.position-subtab.is-active {
  color: var(--text);
  background: var(--accent-soft);
}

.range-field input[type='range'] {
  display: block;
  width: 100%;
  height: 18px;
  padding: 0;
  border: 0;
  appearance: none;
  background: transparent;
  box-sizing: border-box;
}

.range-field input[type='range']::-webkit-slider-runnable-track {
  width: 100%;
  height: 4px;
  border: 0;
  background: var(--accent-soft);
}

.range-field input[type='range']::-webkit-slider-thumb {
  width: 14px;
  height: 14px;
  margin-top: -5px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  appearance: none;
  background: #fff;
  box-shadow: 0 1px 2px rgb(23 22 20 / 14%);
  cursor: pointer;
}

.range-field input[type='range']::-moz-range-track {
  width: 100%;
  height: 4px;
  border: 0;
  background: var(--accent-soft);
}

.range-field input[type='range']::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgb(23 22 20 / 14%);
  cursor: pointer;
}

.range-field input[type='range']::-moz-range-progress {
  height: 4px;
  background: var(--accent);
}

.range-field input[type='range']:disabled::-webkit-slider-thumb,
.range-field input[type='range']:disabled::-moz-range-thumb {
  cursor: not-allowed;
  opacity: 0.6;
}

.slider-legend {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 18px;
  color: var(--muted);
  font-size: 0.78rem;
}

.profile-tools,
.protocol-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.configuration-main {
  min-width: 0;
}

.configuration-main > .status-card:first-child,
.configuration-main > .empty-state:first-child {
  margin-top: 0;
}

.configuration-sidebar {
  align-self: start;
}

.address-field-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  align-items: start;
}

.configuration-main .address-field-list {
  margin-top: 0;
}

.address-field-list.two-columns {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.address-field {
  display: grid;
  align-content: start;
  gap: 6px;
}

.address-field-label {
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.address-display {
  padding: 0.65rem 0.7rem;
  border: 1px solid rgb(23 22 20 / 8%);
  color: var(--text);
  background: rgb(255 255 255 / 55%);
}

.field {
  display: grid;
  align-content: start;
  align-items: start;
  gap: 6px;
}

.field > span,
.address-field-label {
  min-height: 16px;
  line-height: 1.2;
}

.configuration-main .address-field {
  position: relative;
  min-height: 42px;
}

.configuration-main .address-field-label {
  position: absolute;
  top: 8px;
  right: 10px;
  min-height: 0;
  color: var(--muted);
  font-size: 0.45rem;
  line-height: 1;
  text-align: right;
}

.configuration-main .address-display {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 42px;
}

.configuration-sidebar .address-display {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.configuration-sidebar .address-display > span:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

.launch-config-section {
  margin-top: 18px;
}

.launch-config-root > .panel-header {
  margin-bottom: 0;
}

.launch-config-section .panel-header {
  margin-bottom: 12px;
}

.launch-config-section .address-field-list {
  margin-top: 0;
}

.launch-config-section .address-display {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
}

.field input:not([type='range']) {
  margin: 0;
  line-height: 1.2;
}

.field input[type='range'] {
  margin: 0;
}

.readonly-input {
  cursor: not-allowed;
  color: var(--muted);
  background: #ede8de !important;
}

.network-select:focus,
.field input:focus {
  outline: 2px solid rgb(23 22 20 / 12%);
  outline-offset: 1px;
}

@media (width <= 720px) {
  .app-shell {
    padding: 18px 14px 28px;
  }

  .header-panel,
  .header-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .wallet-status {
    max-width: none;
    text-align: left;
  }

  .network-select {
    width: 100%;
  }

  .balance-row,
  .status-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .vault-card-grid,
  .vault-detail-grid,
  .loan-ticks-list,
  .position-form-grid,
  .address-field-list.two-columns,
  .profile-tools,
  .protocol-grid {
    grid-template-columns: 1fr;
  }
}

@media (width <= 1024px) {
  .vault-list {
    grid-template-columns: 1fr;
  }
}

.setting-hint {
  font-size: 0.75rem;
  margin-top: 8px;
}

.bundle-wallets-table-wrap {
  overflow-x: auto;
}

.bundle-wallets-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.bundle-wallets-table th,
.bundle-wallets-table td {
  padding: 6px 8px;
  text-align: left;
  border-bottom: 1px solid var(--panel-border);
}

.bundle-wallets-table th {
  font-weight: 600;
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.bundle-wallets-table .bundle-row-funded td {
  background: rgb(33 91 56 / 8%);
}

.bundle-wallets-table .bundle-row-low td {
  background: rgb(163 62 42 / 8%);
}

.bundle-wallets-table .address-cell {
  font-family: monospace;
  word-break: break-all;
  font-size: 0.75rem;
}

.runtime-alt-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.runtime-alt-row input {
  flex: 1;
  min-width: 0;
}

.runtime-alt-row button {
  flex-shrink: 0;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--soft);
  box-shadow: inset 0 0 0 1px rgb(23 22 20 / 25%);
  border-radius: 11px;
  cursor: pointer;
  transition: background 0.2s;
}

.toggle-slider::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 2px;
  width: 18px;
  height: 18px;
  background: var(--panel);
  border-radius: 50%;
  transition: transform 0.2s;
}

.toggle-switch input:checked + .toggle-slider {
  background: var(--success);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(18px);
}
