:root {
  color-scheme: light;
  --bg: #f1f4f3;
  --surface: #ffffff;
  --surface-soft: #f7f9f8;
  --ink: #18211f;
  --muted: #65716e;
  --line: #d6ddda;
  --blue: #2457d6;
  --blue-dark: #173a92;
  --green: #0b7f58;
  --green-soft: #e8f6f0;
  --amber: #b26300;
  --amber-soft: #fff4dd;
  --red: #b42318;
  --red-soft: #fff0ed;
  --violet: #6f3fd4;
  --shadow: 0 10px 28px rgba(24, 33, 31, 0.07);
  --shadow-soft: 0 5px 16px rgba(24, 33, 31, 0.05);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: 5px;
  background: linear-gradient(90deg, var(--green), var(--blue), var(--amber));
  pointer-events: none;
  z-index: 10;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: 0.62;
}

a {
  text-decoration: none;
}

.shell {
  width: min(1400px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 40px;
}

.shell > *,
.topbar > *,
.panel-head > *,
label,
input,
select,
textarea,
.status-card,
.summary-card {
  min-width: 0;
}

.topbar,
.toolbar,
.panel,
.log-panel,
.access-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 18px;
  border-radius: 8px;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 22px;
  line-height: 1.2;
}

h2 {
  font-size: 17px;
}

.topbar p {
  color: var(--muted);
  margin-top: 4px;
}

.page-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 4px;
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
}

.wallet-box,
.actions,
.tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.status {
  min-width: 88px;
  color: var(--green);
  font-size: 14px;
  text-align: right;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.local-status-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.status-card,
.summary-card,
.notice-strip {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}

.status-card {
  min-height: 66px;
  padding: 10px 12px;
  display: grid;
  align-content: space-between;
  gap: 5px;
}

.status-label {
  color: var(--muted);
  font-size: 12px;
}

.status-value {
  color: var(--ink);
  font-size: 16px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.status-card.good .status-value {
  color: var(--green);
}

.status-card.warn .status-value {
  color: var(--amber);
}

.status-card.danger-text .status-value {
  color: var(--red);
}

.workspace-details,
.advanced-settings-details {
  margin-top: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 7px;
}

.workspace-details > summary,
.advanced-settings-details > summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.workspace-details > summary::-webkit-details-marker,
.advanced-settings-details > summary::-webkit-details-marker {
  display: none;
}

.workspace-details > summary::after,
.advanced-settings-details > summary::after {
  content: "⌄";
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  transform: rotate(-90deg);
}

.workspace-details[open] > summary::after,
.advanced-settings-details[open] > summary::after {
  transform: rotate(0);
}

.workspace-details[open] > summary,
.advanced-settings-details[open] > summary {
  background: #f8faf9;
  border-bottom: 1px solid var(--line);
}

.workspace-details-title {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 750;
}

.workspace-details-title svg {
  width: 17px;
  height: 17px;
  color: var(--green);
}

.workspace-details-meta {
  min-width: 0;
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.protocol-status-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 10px;
}

.network-settings-details .local-settings {
  margin: 0;
  border: 0;
  border-radius: 0 0 7px 7px;
  box-shadow: none;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
}

.summary-card {
  padding: 13px;
  display: grid;
  gap: 6px;
}

.summary-card strong {
  font-size: 20px;
}

.summary-card span {
  color: var(--muted);
  font-size: 12px;
}

.notice-strip {
  margin-top: 14px;
  padding: 12px 14px;
  color: #33413d;
  line-height: 1.6;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.notice-strip svg {
  width: 18px;
  height: 18px;
  color: var(--green);
  flex: 0 0 auto;
  margin-top: 2px;
}

.notice-strip.warning {
  background: var(--amber-soft);
  border-color: #ead19b;
}

.notice-strip.warning svg {
  color: var(--amber);
}

.notice-strip.danger-note {
  background: var(--red-soft);
  border-color: #efb9b1;
}

.notice-strip.danger-note svg {
  color: var(--red);
}

.public-web-risk-notice[hidden] {
  display: none !important;
}

.public-web-risk-notice {
  margin: 14px 0;
  align-items: center;
}

.public-web-risk-copy {
  flex: 1 1 560px;
  min-width: 0;
}

.public-web-risk-copy strong,
.public-web-risk-copy span {
  display: block;
}

.public-web-risk-copy strong {
  margin-bottom: 3px;
  color: #8d241d;
  font-size: 14px;
}

.public-web-risk-copy span {
  color: #5b3935;
  font-size: 13px;
}

.public-web-risk-ack {
  flex: 0 1 360px;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding-left: 14px;
  border-left: 1px solid #e7b3ac;
  color: #672b25;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
  cursor: pointer;
}

.public-web-risk-ack input {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  margin-top: 1px;
  accent-color: var(--red);
}

.player-safety-banner {
  margin-top: 10px;
  align-items: center;
}

.player-safety-banner div {
  min-width: 0;
}

.player-safety-banner strong,
.player-safety-banner span {
  display: block;
}

.player-safety-banner strong {
  margin-bottom: 2px;
  color: #7b4300;
  font-size: 14px;
}

.player-safety-banner span {
  color: #5c4a2d;
  font-size: 13px;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #33413d;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 700;
}

.pill.good {
  color: var(--green);
  background: var(--green-soft);
  border-color: #b9e2d3;
}

.pill.warn {
  color: var(--amber);
  background: var(--amber-soft);
  border-color: #ead19b;
}

.pill.bad {
  color: var(--red);
  background: var(--red-soft);
  border-color: #efb9b1;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 2fr) minmax(100px, 0.6fr) minmax(120px, 0.6fr) minmax(260px, 1.6fr);
  gap: 12px;
  padding: 14px;
  margin-top: 14px;
  border-radius: 8px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

input,
select,
textarea {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  color: var(--ink);
  background: #fbfcfb;
  border: 1px solid var(--line);
  border-radius: 6px;
  outline: none;
}

textarea {
  resize: vertical;
  line-height: 1.5;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(36, 87, 214, 0.12);
}

.flat-toolbar {
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  align-items: start;
  grid-template-columns: minmax(260px, 0.8fr) minmax(360px, 2fr);
}

.network-toolbar {
  align-items: end;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
}

.task-risk-workspace {
  background: #f8faf9;
  border-bottom: 1px solid var(--line);
}

.task-risk-head {
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
}

.task-risk-head h3 {
  font-size: 15px;
}

.task-risk-head p,
.task-risk-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.task-risk-head .actions,
.task-row-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.panel .task-summary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 0;
}

.task-risk-controls {
  grid-template-columns: repeat(4, minmax(170px, 1fr));
  align-items: end;
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.task-risk-save-actions {
  min-height: 38px;
}

.task-risk-note {
  padding: 0 14px 12px;
}

.task-table-wrap {
  max-height: 320px;
  overflow: auto;
  border-top: 1px solid var(--line);
}

.task-table {
  min-width: 860px;
}

.task-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f3f6f4;
}

.task-table th:nth-child(1) { width: 20%; }
.task-table th:nth-child(2) { width: 11%; }
.task-table th:nth-child(3) { width: 25%; }
.task-table th:nth-child(4) { width: 12%; }
.task-table th:nth-child(5) { width: 13%; }
.task-table th:nth-child(6) { width: 19%; }

.compact-btn {
  min-height: 32px;
  padding: 6px 9px;
  font-size: 12px;
}

.trade-settings {
  grid-template-columns: minmax(220px, 1.8fr) minmax(110px, 0.7fr) minmax(100px, 0.6fr) minmax(100px, 0.6fr) minmax(100px, 0.6fr) minmax(220px, 1.4fr);
}

.player-settings .trade-settings {
  margin: 0;
  border: 0;
  border-radius: 0 0 7px 7px;
  box-shadow: none;
}

.local-settings {
  grid-template-columns: minmax(260px, 1.4fr) minmax(240px, 1.2fr) minmax(240px, 1.2fr) minmax(100px, 0.4fr);
}

.asset-toolbar {
  align-items: end;
  grid-template-columns: minmax(260px, 1.5fr) repeat(2, minmax(180px, 0.7fr));
}

.local-asset-toolbar {
  grid-template-columns: minmax(250px, 1.35fr) repeat(2, minmax(155px, 0.65fr));
}

.instant-mode-row {
  min-height: 62px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.transfer-mode-row {
  min-height: 62px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  background: #fbfcfb;
  border-bottom: 1px solid var(--line);
}

.transfer-workspace.hidden,
#distributionStopBtn.hidden {
  display: none !important;
}

.transfer-workspace > .notice-strip {
  margin: 14px 14px 0;
  box-shadow: none;
}

.transfer-toolbar,
.distribution-toolbar {
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  align-items: end;
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.distribution-recipient-editor {
  background: #f8faf9;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.distribution-recipient-head {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
}

.distribution-recipient-head h3 {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
}

.distribution-recipient-head p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.distribution-editor-scroll {
  max-height: 300px;
  overflow: auto;
  background: #ffffff;
  border-top: 1px solid var(--line);
}

.distribution-editor-table {
  min-width: 680px;
}

.distribution-editor-table th:nth-child(1),
.distribution-editor-table td:nth-child(1) {
  width: 28%;
}

.distribution-editor-table th:nth-child(2),
.distribution-editor-table td:nth-child(2) {
  width: 46%;
  overflow-wrap: anywhere;
}

.distribution-editor-table th:nth-child(3),
.distribution-editor-table td:nth-child(3) {
  width: 26%;
}

.distribution-editor-table input {
  min-width: 140px;
}

.panel .distribution-summary-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.distribution-result-scroll {
  max-height: 520px;
  overflow: auto;
}

.segmented-control {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(104px, 1fr));
  padding: 3px;
  background: #eef2f0;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.segment {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 6px 12px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 5px;
}

.segment.active {
  color: var(--ink);
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(22, 35, 30, 0.12);
}

.inline-note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.instant-execution-toolbar {
  grid-template-columns: minmax(240px, 1.35fr) minmax(155px, 0.7fr) minmax(145px, 0.6fr) repeat(2, minmax(205px, 0.9fr));
  align-items: end;
}

.instant-execution-readout {
  min-height: 64px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  padding: 8px 10px;
  color: var(--muted);
  background: #f4f8f6;
  border-left: 3px solid var(--green);
}

.instant-execution-readout strong {
  color: var(--ink);
  font-size: 15px;
}

.instant-execution-readout small,
.switch-copy small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.switch-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.switch-copy strong {
  font-size: 13px;
}

.instant-execution-notice {
  margin-top: 14px !important;
}

.instant-execution-section > .instant-execution-notice {
  margin: 0 14px 14px !important;
  box-shadow: none;
}

.instant-common-toolbar {
  grid-template-columns: repeat(6, minmax(140px, 1fr));
}

.instant-order-toolbar {
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  margin-top: 0;
  border-top: 1px solid var(--line);
}

.instant-summary-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.toggle-label {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  color: var(--ink);
  background: #fbfcfb;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.toggle-label input {
  width: 17px;
  min-height: 17px;
  margin: 0;
}

.instant-switch-label {
  align-self: end;
  cursor: pointer;
  user-select: none;
}

.instant-switch-label:has(input:checked) {
  color: #0b5d45;
  background: #edf8f3;
  border-color: #9ecfbe;
  box-shadow: inset 3px 0 0 #15906b;
}

.instant-switch-label:has(input:disabled) {
  cursor: not-allowed;
  opacity: 0.56;
}

.full-span {
  grid-column: 1 / -1;
}

.wallet-choice-section {
  padding: 12px 14px;
  background: #f7faf8;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.instant-order-toolbar .wallet-choice-section {
  margin-inline: -14px;
}

.copy-wallet-section {
  margin: 0;
}

.wallet-choice-head,
.wallet-choice-foot,
.panel-foot-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.wallet-choice-head > div:first-child {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.wallet-choice-head span,
.wallet-choice-foot {
  color: var(--muted);
  font-size: 12px;
}

.wallet-choice-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.wallet-choice {
  min-width: 0;
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.wallet-choice:has(input:checked) {
  background: var(--green-soft);
  border-color: #9ecfbe;
}

.wallet-choice input[type="checkbox"] {
  width: 17px;
  min-height: 17px;
  flex: 0 0 auto;
  margin: 0;
}

.wallet-choice-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.wallet-choice-copy strong,
.wallet-choice-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wallet-choice-copy span {
  color: var(--muted);
  font-size: 11px;
}

.wallet-choice-foot {
  justify-content: flex-start;
  margin-top: 9px;
}

.panel-foot-actions {
  justify-content: flex-end;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
}

.deploy-grid {
  grid-template-columns: minmax(250px, 1.4fr) minmax(250px, 1.4fr) minmax(110px, 0.5fr) minmax(210px, 0.8fr);
  align-items: end;
}

.deploy-actions {
  display: flex;
  gap: 8px;
}

.keygen-toolbar {
  grid-template-columns: minmax(120px, 0.4fr) minmax(220px, 1fr) minmax(220px, 0.8fr);
  align-items: end;
}

.tabs-shell {
  position: sticky;
  top: 5px;
  z-index: 30;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 5px;
  margin: 10px 0 8px;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 22px rgba(24, 33, 31, 0.09);
}

.tabs {
  min-width: 0;
  margin: 0;
  flex-wrap: nowrap;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
  scroll-behavior: smooth;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.player-mode-tabs {
  position: sticky;
  top: 5px;
  z-index: 30;
  margin: 10px 0 8px;
  padding: 6px;
  flex-wrap: nowrap;
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 22px rgba(24, 33, 31, 0.09);
  scrollbar-width: none;
}

.player-mode-tabs::-webkit-scrollbar {
  display: none;
}

.tab-scroll-btn {
  width: 34px;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: var(--muted);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.tab-scroll-btn:hover:not(:disabled) {
  color: var(--ink);
  background: #ffffff;
  border-color: #aebbb6;
}

.tab-scroll-btn:disabled {
  cursor: default;
  opacity: 0.28;
}

.tab-scroll-btn svg {
  width: 17px;
  height: 17px;
}

.tab,
.icon-btn,
.primary-btn,
.icon-only,
.link-btn {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  padding: 8px 12px;
  white-space: nowrap;
}

.icon-btn:hover,
.tab:hover,
.link-btn:hover {
  border-color: #b8c3bf;
  background: var(--surface-soft);
}

.tab.active {
  color: #ffffff;
  background: var(--green);
  border-color: var(--green);
  box-shadow: 0 2px 8px rgba(11, 127, 88, 0.2);
}

.quick-trade-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, 0.75fr);
  border-bottom: 1px solid var(--line);
}

.quick-trade-form {
  min-width: 0;
  border-right: 1px solid var(--line);
}

.quick-side-row {
  border-bottom: 0;
}

.quick-form-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1.4fr) minmax(180px, 0.7fr) minmax(260px, 1fr);
  gap: 12px;
  padding: 0 14px 12px;
}

.input-with-unit {
  position: relative;
}

.input-with-unit input {
  padding-right: 72px;
}

.input-with-unit span {
  position: absolute;
  top: 50%;
  right: 10px;
  max-width: 58px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  transform: translateY(-50%);
  white-space: nowrap;
}

.quick-amount-chips {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 0 14px 14px;
}

.quick-amount-chips .mini-btn {
  width: 100%;
}

.quick-token-card {
  min-width: 0;
  padding: 14px;
  background: #f8faf9;
}

.quick-token-title {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 38px;
  align-items: center;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.quick-token-title > div {
  min-width: 0;
}

.quick-token-title strong,
.quick-token-title span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quick-token-title span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.token-monogram {
  width: 40px;
  height: 40px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  margin: 0 !important;
  color: #ffffff !important;
  background: var(--green);
  border-radius: 7px;
  font-size: 13px !important;
  font-weight: 800;
}

.quick-check-list {
  display: grid;
  gap: 0;
  margin-top: 4px;
}

.quick-check-list > div {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #e3e9e6;
  font-size: 13px;
}

.quick-check-list > div:last-child {
  border-bottom: 0;
}

.quick-check-list span {
  color: var(--muted);
}

.quick-check-list strong {
  text-align: right;
  overflow-wrap: anywhere;
}

.panel .quick-summary-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.quick-risk-note {
  margin: 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0 0 8px 8px;
  box-shadow: none;
}

.disabled-link {
  pointer-events: none;
  opacity: 0.42;
}

.primary-btn {
  color: #ffffff;
  background: var(--blue);
  border-color: var(--blue);
}

.primary-btn:hover {
  background: var(--blue-dark);
}

.ghost-btn {
  color: var(--green);
  background: var(--green-soft);
  border-color: #b9e2d3;
}

.disabled-btn {
  cursor: not-allowed;
  opacity: 0.62;
}

.icon-only {
  width: 38px;
  padding: 8px;
}

button svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}

.link-btn svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.choice-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 18px;
  display: grid;
  gap: 14px;
}

.choice-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.choice-title svg {
  width: 22px;
  height: 22px;
  color: var(--green);
}

.danger-card .choice-title svg {
  color: var(--red);
}

.choice-card p {
  color: var(--muted);
  line-height: 1.6;
}

.choice-card ul {
  margin: 0;
  padding-left: 18px;
  color: #33413d;
  line-height: 1.7;
}

.access-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(260px, 1fr) auto;
  align-items: end;
  gap: 12px;
  margin-top: 14px;
  padding: 16px;
  border-radius: 8px;
}

.access-panel p {
  color: var(--muted);
  margin-top: 4px;
}

.access-message {
  grid-column: 1 / -1;
  color: var(--green);
  min-height: 20px;
}

.access-message.error {
  color: var(--red);
}

.hidden {
  display: none !important;
}

.player-locked .protected-area {
  display: none !important;
}

.key-output-panel {
  display: block;
}

.panel,
.log-panel {
  display: none;
  border-radius: 8px;
}

.panel.active,
.log-panel {
  display: block;
}

.panel-head {
  position: sticky;
  top: 61px;
  z-index: 12;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.panel-subtitle {
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}

.panel .summary-grid {
  gap: 0;
  padding: 0;
  background: #f8faf9;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.panel .summary-card {
  min-height: 68px;
  padding: 11px 14px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
}

.panel .summary-card:last-child {
  border-right: 0;
}

.panel .summary-card strong {
  font-size: 18px;
}

.panel .instant-summary-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.workflow-rail {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  padding: 0 14px;
  background: #f8faf9;
  border-bottom: 1px solid var(--line);
}

.workflow-rail span {
  min-width: 0;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  border-right: 1px solid var(--line);
}

.workflow-rail span:last-child {
  border-right: 0;
}

.workflow-rail b,
.workflow-step {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #52605c;
  background: #e9eeec;
  border-radius: 50%;
  font-size: 12px;
}

.workflow-rail span.active {
  color: #0b5d45;
}

.workflow-rail span.active b,
.workflow-step {
  color: #ffffff;
  background: var(--green);
}

.workflow-section {
  background: #ffffff;
  border-top: 1px solid var(--line);
}

.workflow-section-head {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 14px;
  background: #fbfcfb;
  border-bottom: 1px solid var(--line);
}

.workflow-section-head > div {
  min-width: 0;
}

.workflow-section-head h3 {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
}

.workflow-section-head p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.workflow-context {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  padding: 6px 9px;
  color: #0b5d45;
  background: var(--green-soft);
  border: 1px solid #b9e2d3;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
}

.workflow-context svg {
  width: 16px;
  height: 16px;
}

.workflow-section > .toolbar {
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.operation-state-bar {
  min-height: 44px;
  margin: 10px 14px !important;
  background: #f7fbf9;
  border-color: #c9ddd5;
  box-shadow: none;
}

#configsPanel {
  scroll-margin-top: 66px;
}

#configsPanel > .panel-head > div:first-child,
#configRunState,
#configRunHint {
  min-width: 0;
  overflow-wrap: anywhere;
}

#configRunState,
#configRunHint {
  max-height: 6em;
  overflow-y: auto;
}

.advanced-settings-details {
  margin: 0;
  border-width: 1px 0 0;
  border-radius: 0;
}

.advanced-settings-details > .toolbar {
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.advanced-settings-details > .notice-strip {
  margin: 0 14px 14px;
  box-shadow: none;
}

#instantPanel.active {
  display: flex;
  flex-direction: column;
}

#instantPanel > .panel-head {
  order: 0;
}

#instantPanel > .workflow-rail {
  order: 1;
}

#instantPanel > .instant-mode-row {
  order: 2;
}

#instantPanel > .instant-order-section {
  order: 3;
}

#instantPanel > .instant-execution-section {
  order: 4;
}

#instantPanel > .instant-advanced-settings {
  order: 5;
}

#instantPanel > .instant-summary-grid {
  order: 6;
}

#instantPanel > .instant-result-table {
  order: 7;
}

.config-export-details {
  border-top: 1px solid var(--line);
  margin-top: 0;
  padding: 0;
}

.config-run-toolbar {
  grid-template-columns:
    minmax(230px, 1.55fr)
    repeat(2, minmax(120px, 0.7fr))
    minmax(190px, 1.15fr);
}

.config-buy-toolbar {
  grid-template-columns: minmax(220px, 0.7fr) minmax(360px, 2fr);
}

.config-export-details > summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 10px 14px;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  background: #fbfcfb;
}

.config-export-details[open] > summary {
  margin-bottom: 0;
  border-bottom: 1px solid var(--line);
}

.config-export-actions {
  margin: 12px 0 0;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.compact-notice {
  font-size: 13px;
}

.panel > .notice-strip {
  margin: 0 14px 14px;
}

.launch-target-bar {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.8fr);
  align-items: stretch;
  margin: 14px;
  border: 1px solid #bfd3e7;
  border-left: 4px solid #2457d6;
  background: #f7fbff;
}

.launch-target-copy,
.launch-plan-readout {
  min-width: 0;
  padding: 12px 14px;
}

.launch-target-copy {
  display: flex;
  align-items: center;
  gap: 12px;
}

.launch-target-copy > svg {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  color: #2457d6;
}

.launch-target-copy div,
.launch-plan-readout {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.launch-target-copy span,
.launch-plan-readout span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.launch-target-copy strong,
.launch-plan-readout strong {
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 15px;
}

.launch-target-copy small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.launch-plan-readout {
  justify-content: center;
  border-left: 1px solid #bfd3e7;
  background: #eef7f3;
}

.launch-workspace {
  display: grid;
  grid-template-columns: minmax(390px, 0.82fr) minmax(0, 1.48fr);
  min-height: 690px;
  margin-top: 2px;
  border-top: 1px solid var(--line);
}

.launch-config-pane,
.launch-monitor-pane {
  min-width: 0;
  background: #ffffff;
}

.launch-config-pane {
  border-right: 1px solid var(--line);
}

.launch-pane-head {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: #f8faf9;
}

.launch-pane-head h3 {
  font-size: 16px;
}

.launch-pane-head p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.launch-config-scroll {
  max-height: min(720px, calc(100vh - 250px));
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.launch-config-group {
  border-bottom: 1px solid var(--line);
}

.launch-config-group > summary {
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  color: var(--ink);
  cursor: pointer;
  user-select: none;
  list-style: none;
  background: #ffffff;
}

.launch-config-group > summary::-webkit-details-marker {
  display: none;
}

.launch-config-group > summary::after {
  content: "⌄";
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  transform: rotate(-90deg);
}

.launch-config-group[open] > summary::after {
  transform: rotate(0);
}

.launch-config-group > summary span {
  font-size: 14px;
  font-weight: 750;
}

.launch-config-group > summary small {
  margin-left: auto;
  color: var(--muted);
  font-size: 11px;
}

.launch-config-group[open] > summary {
  color: #0b5d45;
  background: #f4f9f6;
}

.launch-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
  padding: 4px 14px 14px;
  background: #fbfcfb;
}

.launch-quote-catalog {
  padding: 0 14px 14px;
  background: #fbfcfb;
}

.launch-quote-catalog-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0 8px;
  border-top: 1px solid var(--line);
}

.launch-quote-catalog-head > div {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.launch-quote-catalog-head strong {
  color: var(--ink);
  font-size: 12px;
}

.launch-quote-catalog-head span {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.launch-quote-legend {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.launch-quote-legend i,
.launch-quote-token-swatch {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #8a9a94;
}

.launch-quote-legend i {
  background: #15906b;
}

.launch-quote-token-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  max-height: 184px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.launch-quote-token {
  min-width: 0;
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 6px 8px;
  border: 1px solid #dce5e1;
  border-radius: 6px;
  background: #ffffff;
}

.launch-quote-token.is-rwa {
  border-color: #d8d9bf;
  background: #fffef7;
}

.launch-quote-token.is-extra {
  border-style: dashed;
}

.launch-quote-token.is-disabled {
  opacity: 0.58;
}

.launch-quote-token.is-excluded {
  opacity: 0.46;
  background: #f4f6f5;
}

.launch-quote-token.is-rwa .launch-quote-token-swatch {
  background: #a47a1b;
}

.launch-quote-token.is-crypto .launch-quote-token-swatch {
  background: #2457d6;
}

.launch-quote-token.is-native .launch-quote-token-swatch,
.launch-quote-token.is-ready .launch-quote-token-swatch {
  background: #15906b;
}

.launch-quote-token-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.launch-quote-token-copy strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.launch-quote-token-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.launch-quote-token-state {
  color: #48625a;
  font-size: 9px;
  font-weight: 750;
  white-space: nowrap;
}

.launch-quote-token.is-ready .launch-quote-token-state {
  color: #0b7456;
}

.launch-quote-token.is-active {
  border-color: #15906b;
  box-shadow: inset 3px 0 0 #15906b;
}

.launch-quote-token.is-disabled .launch-quote-token-state {
  color: #9b2c2c;
}

.launch-config-foot {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  background: #f8faf9;
  font-size: 12px;
  line-height: 1.4;
}

.launch-config-foot svg {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  color: #15906b;
}

.launch-monitor-pane {
  display: flex;
  flex-direction: column;
}

.launch-wallet-section {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfb;
}

.launch-subhead,
.launch-event-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.launch-subhead {
  margin-bottom: 8px;
}

.launch-subhead strong,
.launch-event-head strong {
  color: var(--ink);
  font-size: 13px;
}

.launch-subhead span,
.launch-event-head span {
  color: var(--muted);
  font-size: 11px;
}

.launch-wallet-scroll {
  max-height: 138px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--line);
  background: #ffffff;
}

.launch-wallet-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 7px 10px;
  border-bottom: 1px solid #edf1ef;
}

.launch-wallet-item:last-child {
  border-bottom: 0;
}

.launch-wallet-identity,
.launch-wallet-role {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.launch-wallet-identity strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.launch-wallet-identity small,
.launch-wallet-role small {
  color: var(--muted);
  font-size: 11px;
}

.launch-wallet-role {
  align-items: flex-end;
  text-align: right;
}

.launch-wallet-role strong {
  color: #0b5d45;
  font-size: 11px;
}

.launch-empty {
  padding: 18px 12px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.launch-state-grid {
  margin: 0;
  padding: 9px 14px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.launch-event-head {
  min-height: 50px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: #f8faf9;
}

.launch-event-head > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.launch-event-scroll {
  width: auto;
  height: 520px;
  max-height: 520px;
  flex: 0 0 auto;
  margin: 0 14px 14px;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  border: 1px solid var(--line);
  background: #ffffff;
}

.launch-event-table {
  min-width: 1040px;
}

.launch-event-table thead {
  position: sticky;
  top: 0;
  z-index: 3;
}

.launch-event-table thead th {
  box-shadow: inset 0 -1px 0 var(--line);
}

.launch-event-table th:nth-child(1) {
  width: 9%;
}

.launch-event-table th:nth-child(2) {
  width: 18%;
}

.launch-event-table th:nth-child(3) {
  width: 15%;
}

.launch-event-table th:nth-child(4) {
  width: 12%;
}

.launch-event-table th:nth-child(5) {
  width: 14%;
}

.launch-event-table th:nth-child(6) {
  width: 24%;
}

.launch-event-table th:nth-child(7) {
  width: 8%;
}

.launch-cell-stack {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.launch-cell-stack strong {
  color: var(--ink);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.launch-cell-stack span,
.launch-cell-stack small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.launch-cell-stack a {
  overflow-wrap: anywhere;
}

.launch-token-link {
  color: #2457d6;
  font-size: 12px;
  font-weight: 750;
}

.launch-result-details {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
}

.launch-result-details summary {
  color: #2457d6;
  cursor: pointer;
  font-weight: 700;
}

.launch-result-list {
  display: grid;
  gap: 4px;
  margin-top: 6px;
}

.launch-result-item {
  padding-left: 7px;
  border-left: 2px solid var(--line);
  overflow-wrap: anywhere;
}

.launch-result-item.good {
  border-left-color: #15906b;
}

.launch-result-item.bad {
  border-left-color: #c75050;
}

table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  min-width: 980px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 10px;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 13px;
  background: #f8faf8;
}

tr:hover td {
  background: #fbfcfb;
}

.asset-table th:nth-child(1),
.asset-table td:nth-child(1) {
  width: 16%;
}

.asset-table th:nth-child(2),
.asset-table td:nth-child(2),
.asset-table th:nth-child(3),
.asset-table td:nth-child(3) {
  width: 16%;
}

.asset-table th:nth-child(4),
.asset-table td:nth-child(4) {
  width: 24%;
}

.asset-table th:nth-child(5),
.asset-table td:nth-child(5) {
  width: 28%;
}

.cell-subtitle {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.number-cell {
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.row-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.mini-btn {
  min-width: 54px;
  min-height: 32px;
  padding: 5px 9px;
  color: var(--blue);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.mini-btn:hover {
  border-color: var(--blue);
  background: #f2f6ff;
}

.danger-mini {
  color: var(--red);
  background: var(--red-soft);
  border-color: #efb9b1;
}

.danger-mini:hover:not(:disabled) {
  color: #8d1b13;
  background: #ffe4df;
  border-color: #d98d82;
}

.danger-mini:disabled {
  cursor: default;
  color: var(--muted);
  background: var(--surface-soft);
  border-color: var(--line);
  opacity: 0.58;
}

.empty-row td {
  padding: 28px 14px;
  color: var(--muted);
  text-align: center;
}

.history-table {
  min-width: 760px;
}

.history-table th:nth-child(1),
.history-table td:nth-child(1) {
  width: 24%;
}

.history-table th:nth-child(2),
.history-table td:nth-child(2) {
  width: 22%;
}

.history-table th:nth-child(3),
.history-table td:nth-child(3),
.history-table th:nth-child(5),
.history-table td:nth-child(5) {
  width: 14%;
}

.history-table th:nth-child(4),
.history-table td:nth-child(4) {
  width: 26%;
}

.status-good {
  color: var(--green);
  font-weight: 700;
}

.status-warn {
  color: var(--amber);
  font-weight: 700;
}

.status-bad {
  color: var(--red);
  font-weight: 700;
}

table a {
  color: var(--blue);
}

td:nth-child(1),
td:nth-child(4) {
  width: 30%;
}

td:nth-child(2),
td:nth-child(3),
td:nth-child(5) {
  width: 13%;
}

td:nth-child(6) {
  width: 58px;
}

.atomic-table th:nth-child(1),
.atomic-table td:nth-child(1) {
  width: 120px;
}

.atomic-table th:nth-child(2),
.atomic-table td:nth-child(2),
.atomic-table th:nth-child(5),
.atomic-table td:nth-child(5) {
  width: 25%;
}

.atomic-table th:nth-child(3),
.atomic-table td:nth-child(3),
.atomic-table th:nth-child(4),
.atomic-table td:nth-child(4),
.atomic-table th:nth-child(6),
.atomic-table td:nth-child(6) {
  width: 12%;
}

.atomic-table th:nth-child(7),
.atomic-table td:nth-child(7) {
  width: 58px;
}

.danger {
  color: #ffffff;
  background: var(--red);
  border-color: var(--red);
}

.danger:hover {
  background: #8f1c14;
  border-color: #8f1c14;
}

.asset-total-row {
  padding: 0 14px 14px;
}

.saved-token-strip {
  min-height: 48px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fbfcfb;
}

.saved-token-strip .inline-note {
  overflow-wrap: anywhere;
}

.wallet-table input[type="checkbox"] {
  width: 17px;
  min-height: 17px;
  margin: 0;
}

.wallet-row-hidden td {
  color: #70807a;
  background: #f5f7f6;
}

.hidden-wallet-dialog {
  width: min(760px, calc(100% - 28px));
  max-height: min(760px, calc(100vh - 28px));
  padding: 0;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  box-shadow: 0 24px 64px rgba(26, 38, 34, 0.22);
}

.hidden-wallet-dialog::backdrop {
  background: rgba(20, 29, 26, 0.48);
}

.dialog-head,
.hidden-wallet-manager-toolbar,
.dialog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
}

.dialog-head {
  border-bottom: 1px solid var(--line);
}

.dialog-head h2 {
  margin: 0;
  font-size: 18px;
}

.hidden-wallet-manager-toolbar {
  background: var(--surface-soft);
}

.hidden-wallet-manager-table {
  max-height: min(460px, 52vh);
  margin: 0;
  border-inline: 0;
  border-radius: 0;
}

.hidden-wallet-manager-table table {
  min-width: 650px;
}

.hidden-wallet-manager-table input[type="checkbox"] {
  width: 17px;
  min-height: 17px;
  margin: 0;
}

.dialog-actions {
  justify-content: flex-end;
  border-top: 1px solid var(--line);
}

.wallet-state {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.wallet-state.is-active {
  color: var(--green);
  background: var(--green-soft);
  border-color: #b9e2d3;
}

.wallet-state.is-hidden {
  color: #5d6965;
  background: #eef1f0;
  border-color: #d4dbd8;
}

.table-icon-btn {
  width: 34px;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.table-icon-btn:hover {
  color: var(--green);
  background: var(--green-soft);
  border-color: #b9e2d3;
}

.table-icon-btn svg {
  width: 17px;
  height: 17px;
}

.project-safety-notice {
  margin-top: 14px !important;
}

.project-config-toolbar {
  grid-template-columns: repeat(6, minmax(150px, 1fr));
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  margin: 0;
  align-items: end;
}

.project-config-toolbar .project-token-field {
  grid-column: span 2;
}

.project-wallet-tools {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfb;
}

.project-generate-controls {
  display: grid;
  grid-template-columns: minmax(130px, 0.55fr) minmax(240px, 1fr) auto;
  gap: 10px;
  align-items: end;
  min-width: 0;
}

.project-selection-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  align-items: center;
}

.project-hidden-toggle {
  min-height: 38px;
  display: flex;
  align-items: center;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
}

.project-hidden-toggle input {
  width: 17px;
  min-height: 17px;
}

.panel .project-summary-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.project-operation-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  background: #f7fbff;
}

.project-operation-bar > div:first-child {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.project-operation-bar > div:first-child span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.project-operation-bar .actions {
  flex: 0 0 auto;
}

.project-wallet-scroll {
  height: min(520px, 58vh);
  min-height: 300px;
  overflow: auto;
  overscroll-behavior: contain;
  border-bottom: 1px solid var(--line);
}

.project-wallet-table {
  min-width: 1320px;
}

.project-wallet-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f3f6f5;
}

.project-wallet-table th:nth-child(1),
.project-wallet-table td:nth-child(1) {
  width: 58px;
}

.project-wallet-table th:nth-child(2),
.project-wallet-table td:nth-child(2) {
  width: 170px;
}

.project-wallet-table th:nth-child(3),
.project-wallet-table td:nth-child(3) {
  width: 250px;
}

.project-wallet-table th:nth-child(4),
.project-wallet-table td:nth-child(4),
.project-wallet-table th:nth-child(5),
.project-wallet-table td:nth-child(5) {
  width: 150px;
}

.project-wallet-table th:nth-child(6),
.project-wallet-table td:nth-child(6) {
  width: 140px;
}

.project-wallet-table th:nth-child(7),
.project-wallet-table td:nth-child(7) {
  width: 145px;
}

.project-wallet-table th:nth-child(8),
.project-wallet-table td:nth-child(8) {
  width: 150px;
}

.project-wallet-table th:nth-child(9),
.project-wallet-table td:nth-child(9) {
  width: 64px;
}

.project-wallet-table input[type="checkbox"] {
  width: 17px;
  min-height: 17px;
  margin: 0;
}

.project-wallet-table input[data-project-funding-id] {
  min-width: 110px;
}

.project-wallet-table tr.is-project-hidden td {
  color: #6f7976;
  background: #f3f5f4;
}

.project-wallet-table tr.is-vault-hidden td {
  background: #fff7ed;
}

.project-wallet-identity {
  display: grid;
  gap: 3px;
}

.project-wallet-identity small,
.project-balance-note {
  color: var(--muted);
  font-size: 11px;
}

.project-table-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  background: #fbfcfb;
}

.collection-table {
  min-width: 880px;
}

.distribution-table {
  min-width: 980px;
}

.instant-table {
  min-width: 1160px;
}

.transaction-table {
  min-width: 1180px;
}

.transaction-table th:nth-child(6),
.transaction-table td:nth-child(6) {
  min-width: 190px;
}

.instant-table th:nth-child(1),
.instant-table td:nth-child(1),
.instant-table th:nth-child(2),
.instant-table td:nth-child(2) {
  width: 16%;
}

.instant-table th:nth-child(3),
.instant-table td:nth-child(3),
.instant-table th:nth-child(4),
.instant-table td:nth-child(4),
.instant-table th:nth-child(5),
.instant-table td:nth-child(5) {
  width: 13%;
}

.instant-table th:nth-child(6),
.instant-table td:nth-child(6) {
  width: 18%;
}

.instant-table th:nth-child(7),
.instant-table td:nth-child(7) {
  width: 11%;
}

.collection-table th:nth-child(1),
.collection-table td:nth-child(1) {
  width: 26%;
}

.collection-table th:nth-child(2),
.collection-table td:nth-child(2),
.collection-table th:nth-child(3),
.collection-table td:nth-child(3) {
  width: 20%;
}

.collection-table th:nth-child(4),
.collection-table td:nth-child(4) {
  width: 22%;
}

.collection-table th:nth-child(5),
.collection-table td:nth-child(5) {
  width: 12%;
}

.distribution-table th:nth-child(1),
.distribution-table td:nth-child(1) {
  width: 20%;
}

.distribution-table th:nth-child(2),
.distribution-table td:nth-child(2) {
  width: 28%;
  overflow-wrap: anywhere;
}

.distribution-table th:nth-child(3),
.distribution-table td:nth-child(3) {
  width: 18%;
}

.distribution-table th:nth-child(4),
.distribution-table td:nth-child(4) {
  width: 22%;
}

.distribution-table th:nth-child(5),
.distribution-table td:nth-child(5) {
  width: 12%;
}

.log-panel {
  margin-top: 14px;
}

.player-log-details {
  margin-top: 14px;
}

.player-log-details .player-log-content {
  margin: 0;
  border: 0;
  border-radius: 0 0 7px 7px;
  box-shadow: none;
}

.player-log-toolbar {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 10px 7px 14px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}

#logBox,
#playerLog {
  min-height: 150px;
  max-height: 260px;
  overflow: auto;
  margin: 0;
  padding: 14px;
  color: #24302d;
  background: #fbfcfb;
  white-space: pre-wrap;
  word-break: break-word;
}

.curve-fill-toolbar {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.curve-fill-quote-catalog {
  padding: 0 12px 12px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.curve-fill-quote-catalog .launch-quote-token-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  max-height: 152px;
}

.curve-fill-token-field {
  grid-column: span 2;
}

.curve-fill-filter-panel {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #f8faf9;
}

.curve-fill-filter-panel > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 48px;
  padding: 10px 16px;
  cursor: pointer;
  list-style: none;
}

.curve-fill-filter-panel > summary::-webkit-details-marker {
  display: none;
}

.curve-fill-filter-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.curve-fill-filter-title svg {
  width: 16px;
  height: 16px;
  color: var(--blue);
}

.curve-fill-formula-summary {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.curve-fill-filter-scroll {
  max-height: 430px;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  border-top: 1px solid var(--line);
  background: #ffffff;
}

.curve-fill-filter-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 0;
}

.curve-fill-blocklist-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 0 14px 14px;
}

.curve-fill-blocklist-grid label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
}

.curve-fill-blocklist-grid textarea {
  width: 100%;
  min-height: 76px;
  resize: vertical;
}

.curve-fill-check {
  align-content: end;
}

.curve-fill-check .check-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 10px;
  color: var(--ink);
  background: #fbfcfb;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.curve-fill-check input[type="checkbox"] {
  width: 17px;
  height: 17px;
  min-height: 0;
  margin: 0;
  accent-color: var(--blue);
}

.curve-fill-progress {
  padding: 13px 16px 11px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #f8faf9;
}

.curve-fill-progress-head,
.curve-fill-event-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.curve-fill-progress-head span,
.curve-fill-event-head span {
  color: var(--muted);
  font-size: 11px;
}

.curve-fill-progress-head strong,
.curve-fill-event-head strong {
  color: var(--ink);
  font-size: 13px;
}

.curve-fill-progress-track {
  height: 8px;
  margin-top: 9px;
  overflow: hidden;
  border: 1px solid #cbd8d2;
  border-radius: 4px;
  background: #e8eeeb;
}

.curve-fill-progress-track i {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #2457d6 0 72%, #15906b 72% 100%);
  transition: width 180ms ease;
}

.panel .curve-fill-summary-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding-top: 12px;
  padding-bottom: 12px;
}

.curve-fill-risk-band {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.curve-fill-time-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}

.curve-fill-time-grid > div {
  min-width: 0;
  padding: 11px 14px;
  border-right: 1px solid var(--line);
}

.curve-fill-time-grid > div:last-child {
  border-right: 0;
}

.curve-fill-time-grid span,
.curve-fill-address-list span {
  display: block;
  color: var(--muted);
  font-size: 10px;
}

.curve-fill-time-grid strong {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 13px;
}

.curve-fill-address-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.curve-fill-address-list > div {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr) minmax(150px, 0.85fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 50px;
  padding: 8px 14px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.curve-fill-address-list > div:nth-child(2n) {
  border-right: 0;
}

.curve-fill-address-list > div:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.curve-fill-address-list code,
.curve-fill-address-list strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.curve-fill-address-list code {
  color: #174bad;
  font-size: 11px;
}

.curve-fill-address-list strong {
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
}

.curve-fill-event-head {
  min-height: 48px;
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #f8faf9;
}

.curve-fill-event-head > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.curve-fill-event-scroll {
  width: auto;
  height: 360px;
  max-height: 360px;
  margin: 12px 14px 14px;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  border: 1px solid var(--line);
  background: #ffffff;
}

.curve-fill-event-table {
  min-width: 1060px;
}

.curve-fill-event-table thead {
  position: sticky;
  top: 0;
  z-index: 3;
}

.curve-fill-event-table thead th {
  box-shadow: inset 0 -1px 0 var(--line);
}

.curve-fill-event-table th:nth-child(1) { width: 10%; }
.curve-fill-event-table th:nth-child(2) { width: 10%; }
.curve-fill-event-table th:nth-child(3) { width: 17%; }
.curve-fill-event-table th:nth-child(4) { width: 15%; }
.curve-fill-event-table th:nth-child(5) { width: 17%; }
.curve-fill-event-table th:nth-child(6) { width: 12%; }
.curve-fill-event-table th:nth-child(7) { width: 14%; }
.curve-fill-event-table th:nth-child(8) { width: 5%; }

@media (max-width: 1100px) {
  .trade-settings,
  .local-settings,
  .instant-execution-toolbar,
  .instant-common-toolbar,
  .instant-order-toolbar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .panel .instant-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .network-toolbar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .task-risk-controls {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .wallet-choice-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .launch-workspace {
    grid-template-columns: minmax(340px, 0.75fr) minmax(0, 1.25fr);
  }

  .curve-fill-toolbar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .curve-fill-quote-catalog .launch-quote-token-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .curve-fill-filter-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .curve-fill-address-list {
    grid-template-columns: 1fr;
  }

  .curve-fill-address-list > div,
  .curve-fill-address-list > div:nth-child(2n) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .curve-fill-address-list > div:last-child {
    border-bottom: 0;
  }

  .protocol-status-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .shell {
    width: min(100% - 14px, 1400px);
    padding-top: 10px;
  }

  .topbar,
  .panel-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .panel-head {
    position: static;
  }

  .task-risk-head {
    align-items: stretch;
    flex-direction: column;
  }

  .task-risk-controls {
    grid-template-columns: 1fr;
  }

  .toolbar {
    grid-template-columns: 1fr;
  }

  .project-config-toolbar,
  .project-config-toolbar .project-token-field {
    grid-template-columns: 1fr;
    grid-column: auto;
  }

  .project-wallet-tools,
  .project-operation-bar,
  .project-table-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .project-generate-controls {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .project-selection-actions {
    justify-content: flex-start;
  }

  .project-selection-actions > button,
  .project-selection-actions > label,
  .project-operation-bar .actions button {
    flex: 1 1 140px;
  }

  .panel .project-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-wallet-scroll {
    height: 480px;
    max-height: 58vh;
  }

  .status-grid,
  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .panel .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quick-trade-layout {
    grid-template-columns: 1fr;
  }

  .quick-trade-form {
    border-right: 0;
  }

  .quick-form-grid {
    grid-template-columns: 1fr;
  }

  .quick-token-card {
    border-top: 1px solid var(--line);
  }

  .panel .quick-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .instant-mode-row {
    align-items: stretch;
    flex-direction: column;
  }

  .transfer-mode-row {
    align-items: stretch;
    flex-direction: column;
  }

  .segmented-control {
    width: 100%;
  }

  .local-status-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .workspace-details-meta {
    white-space: normal;
  }

  .tabs-shell {
    margin-top: 8px;
  }

  .workflow-rail {
    display: flex;
    gap: 0;
    padding: 0;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
  }

  .workflow-rail::-webkit-scrollbar {
    display: none;
  }

  .workflow-rail span {
    flex: 1 0 180px;
  }

  .workflow-section-head {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .workflow-context {
    margin-left: 35px;
  }

  .access-panel,
  .keygen-toolbar {
    grid-template-columns: 1fr;
  }

  .choice-grid {
    grid-template-columns: 1fr;
  }

  .wallet-choice-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .wallet-choice-grid {
    grid-template-columns: 1fr;
  }

  .wallet-box,
  .actions {
    width: 100%;
  }

  .public-web-risk-notice {
    align-items: flex-start;
    flex-direction: column;
  }

  .public-web-risk-copy,
  .public-web-risk-ack {
    flex-basis: auto;
    width: 100%;
  }

  .public-web-risk-ack {
    padding-top: 10px;
    padding-left: 0;
    border-top: 1px solid #e7b3ac;
    border-left: 0;
  }

  .wallet-box button,
  .wallet-box .link-btn,
  .actions button {
    flex: 1 1 132px;
  }

  .launch-target-bar {
    grid-template-columns: 1fr;
  }

  .launch-plan-readout {
    border-top: 1px solid #bfd3e7;
    border-left: 0;
  }

  .launch-workspace {
    grid-template-columns: 1fr;
  }

  .launch-config-pane {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .launch-config-scroll {
    max-height: 480px;
  }

  .launch-event-scroll {
    height: 460px;
    max-height: 460px;
  }

  .curve-fill-toolbar {
    grid-template-columns: 1fr;
  }

  .curve-fill-quote-catalog .launch-quote-token-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .curve-fill-token-field {
    grid-column: auto;
  }

  .curve-fill-filter-panel > summary {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .curve-fill-formula-summary {
    width: 100%;
    overflow: visible;
    text-align: left;
    text-overflow: clip;
    white-space: normal;
  }

  .curve-fill-filter-grid,
  .curve-fill-blocklist-grid {
    grid-template-columns: 1fr;
  }

  .curve-fill-filter-scroll {
    max-height: 520px;
  }

  .curve-fill-time-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .curve-fill-time-grid > div:nth-child(2n) {
    border-right: 0;
  }

  .curve-fill-time-grid > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .curve-fill-address-list > div {
    grid-template-columns: 90px minmax(0, 1fr);
  }

  .curve-fill-address-list strong {
    grid-column: 2;
    white-space: normal;
  }

  .panel .curve-fill-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .curve-fill-event-scroll {
    height: 420px;
    max-height: 420px;
  }
}

@media (max-width: 520px) {
  .hidden-wallet-dialog .dialog-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
  }

  .hidden-wallet-dialog .dialog-actions button {
    width: 100%;
    min-width: 0;
  }

  .hidden-wallet-dialog #deleteHiddenSelectedBtn {
    grid-column: 1 / -1;
  }

  .topbar > div,
  .panel-head > div {
    width: 100%;
    min-width: 0;
  }

  .topbar p,
  .page-kicker {
    overflow-wrap: anywhere;
  }

  .wallet-box,
  .actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  #transfersPanel .actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .wallet-console-page .topbar .wallet-box {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 38px;
  }

  .wallet-console-page .topbar .wallet-box #clearLogBtn {
    width: 38px;
  }

  .wallet-box .status {
    grid-column: 1 / -1;
    width: 100%;
    text-align: left;
  }

  .wallet-box button,
  .wallet-box .link-btn,
  .actions button {
    width: 100%;
    min-width: 0;
    padding-inline: 8px;
  }

  .status-grid,
  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .player-status-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quick-amount-chips {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .panel .quick-summary-grid {
    grid-template-columns: 1fr;
  }

  .wallet-console-page .local-status-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .wallet-console-page .local-status-grid .status-card {
    min-height: 60px;
    padding: 9px;
  }

  .wallet-console-page .local-status-grid .status-value {
    font-size: 14px;
  }

  .topbar {
    padding: 13px;
  }

  .topbar h1 {
    font-size: 20px;
  }

  .workspace-details > summary,
  .advanced-settings-details > summary {
    gap: 8px;
    padding-inline: 10px;
  }

  .workspace-details-meta {
    display: none;
  }

  .protocol-status-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tabs-shell {
    grid-template-columns: 32px minmax(0, 1fr) 32px;
    gap: 4px;
    padding: 5px;
  }

  .tab-scroll-btn {
    width: 32px;
  }

  .tab {
    min-height: 36px;
    padding: 7px 10px;
  }

  .workflow-section-head {
    padding: 10px;
  }

  .workflow-context {
    width: calc(100% - 35px);
    justify-content: center;
  }

  .operation-state-bar {
    margin: 8px 10px !important;
  }

  .panel .instant-summary-grid {
    grid-template-columns: 1fr;
  }

  .panel .distribution-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .launch-target-bar {
    margin: 10px;
  }

  .launch-target-copy,
  .launch-plan-readout {
    padding: 11px;
  }

  .launch-pane-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .launch-pane-head .icon-btn {
    width: 100%;
  }

  .launch-field-grid {
    grid-template-columns: 1fr;
  }

  .launch-quote-token-grid {
    grid-template-columns: 1fr;
    max-height: 210px;
  }

  .curve-fill-quote-catalog .launch-quote-token-grid {
    grid-template-columns: 1fr;
    max-height: 210px;
  }

  .launch-quote-catalog-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .launch-config-group > summary {
    align-items: flex-start;
  }

  .launch-config-group > summary small {
    display: none;
  }

  .launch-config-scroll {
    max-height: 420px;
  }

  .launch-wallet-scroll {
    max-height: 126px;
  }

  .launch-event-scroll {
    height: 410px;
    max-height: 410px;
    margin: 0 10px 10px;
  }
}

/* Console workspace: compact controls and persistent navigation. */
.wallet-console-page {
  --bg: #f4f6f8;
  --ink: #202a30;
  --muted: #63727c;
  --line: #dfe5e9;
  --surface-soft: #f7f9fb;
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: 0;
}

.wallet-console-page::before {
  display: none;
}

.wallet-console-page .shell {
  width: min(1600px, calc(100% - 32px));
  padding-top: 12px;
}

.wallet-console-page .topbar {
  padding: 10px 0 18px;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.wallet-console-page h1 { font-size: 22px; }
.wallet-console-page h2 { font-size: 16px; }
.wallet-console-page .topbar p { font-size: 12px; }
.wallet-console-page .page-kicker { font-size: 11px; }

.wallet-console-page .local-status-primary {
  gap: 0;
  margin-top: 0;
  border: 1px solid var(--line);
  background: var(--surface);
}

.wallet-console-page .local-status-primary .status-card {
  min-height: 66px;
  padding: 10px 14px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.wallet-console-page .local-status-primary .status-card:last-child { border-right: 0; }
.wallet-console-page .local-status-primary .status-card.good { background: #edf7f3; }
.wallet-console-page .status-value { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.wallet-console-page .workspace-details { margin-top: 6px; border-radius: 0; }
.wallet-console-page .workspace-details > summary { min-height: 40px; padding: 8px 14px; }
.wallet-console-page .workspace-details-meta { font-size: 11px; }

.wallet-console-page .panel,
.wallet-console-page .log-panel {
  border: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
}

.wallet-console-page .panel-head { padding: 14px 16px; }
.wallet-console-page .panel-subtitle { font-size: 12px; line-height: 1.6; }
.wallet-console-page .panel .summary-card { min-height: 60px; padding: 8px 16px; }
.wallet-console-page .panel .summary-card strong { font-size: 18px; font-variant-numeric: tabular-nums; }
.wallet-console-page .toolbar { box-shadow: none; }
.wallet-console-page .notice-strip { box-shadow: none; }
.wallet-console-page input,
.wallet-console-page select,
.wallet-console-page textarea { font-size: 13px; }
.wallet-console-page button { font-size: 13px; }
.wallet-console-page button:focus-visible,
.wallet-console-page summary:focus-visible,
.wallet-console-page .table-wrap:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.wallet-console-page .tabs-shell {
  display: block;
  padding: 6px 10px;
  border-radius: 0;
  box-shadow: 0 2px 5px rgba(25, 40, 50, 0.04);
  top: 0;
}

.wallet-console-page .tab-scroll-btn,
.wallet-console-page .console-nav-brand,
.wallet-console-page #workspaceTabs { display: none; }

.workspace-jump-label {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.workspace-jump-label > svg { width: 19px; height: 19px; color: var(--green); }
.workspace-jump-label select { width: 100%; min-height: 38px; font-weight: 700; }

.asset-token-editor { border-bottom: 1px solid var(--line); background: #fafcfd; }
.asset-token-editor > summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 16px;
  cursor: pointer;
  list-style: none;
}
.asset-token-editor > summary::-webkit-details-marker { display: none; }
.asset-token-editor > summary > span:first-child { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.asset-token-editor > summary > span:first-child::after { content: "+"; margin-left: 4px; color: var(--muted); }
.asset-token-editor[open] > summary > span:first-child::after { content: "-"; }
.asset-token-editor svg { width: 16px; height: 16px; }
.asset-token-fields { display: grid; gap: 10px; padding: 0 16px 14px; }
.asset-token-fields .actions { justify-content: flex-end; }
.asset-selection-toolbar {
  display: grid;
  grid-template-columns: auto minmax(160px, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
}
.asset-selection-toolbar .actions { flex-wrap: nowrap; gap: 6px; }
.asset-selection-toolbar .toggle-label { white-space: nowrap; border: 0; background: transparent; padding: 0; font-size: 12px; }
.wallet-console-page .saved-token-strip { padding: 0 16px 12px; background: #ffffff; border: 0; }
.wallet-console-page .asset-total-row { padding: 10px 16px; }

.wallet-console-page .panel > .table-wrap { max-height: 480px; overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.wallet-console-page #assetsPanel > .wallet-scroll { height: clamp(280px, 48vh, 540px); max-height: 540px; }
.wallet-console-page .table-wrap thead th { position: sticky; top: 0; z-index: 2; background: #f3f6f8; }
.wallet-console-page th { padding: 10px 12px; font-size: 11px; color: #53646f; }
.wallet-console-page td { padding: 10px 12px; font-size: 13px; font-variant-numeric: tabular-nums; }
.wallet-console-page tbody tr:nth-child(even):not(.empty-row) { background: #fafbfd; }
.wallet-console-page tbody tr:hover:not(.empty-row) { background: #f0f7f5; }
.wallet-console-page .wallet-table tbody tr:has(input[data-wallet-id]:checked) { background: #edf7f3; }
.wallet-console-page .wallet-table { min-width: 1100px; }
.wallet-console-page .wallet-table td:nth-child(4) { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; }
.wallet-console-page .wallet-table .empty-row td { height: 180px; text-align: center; color: var(--muted); }
.wallet-console-page .log-panel { margin-top: 12px; }
.wallet-console-page #logBox { min-height: 72px; max-height: 180px; overflow: auto; font-size: 12px; line-height: 1.7; }
.wallet-console-page [aria-busy="true"] > svg { color: var(--muted); }

@media (min-width: 1180px) {
  .wallet-console-page .shell { padding-left: 208px; }
  .wallet-console-page .tabs-shell {
    position: fixed;
    inset: 0 auto 0 max(0px, calc((100vw - 1632px) / 2));
    width: 196px;
    margin: 0;
    padding: 24px 12px 16px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
    border: 0;
    border-right: 1px solid var(--line);
    box-shadow: none;
  }
  .wallet-console-page .console-nav-brand { display: flex; align-items: center; gap: 8px; padding: 0 8px; }
  .console-nav-brand > svg { width: 22px; height: 22px; color: var(--green); }
  .console-nav-brand strong { font-size: 20px; }
  .console-nav-brand span { margin-left: auto; font-size: 10px; color: var(--muted); }
  .wallet-console-page .workspace-jump-label { display: none; }
  .wallet-console-page #workspaceTabs {
    display: flex;
    flex: 1;
    min-height: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scroll-behavior: auto;
  }
  .wallet-console-page #workspaceTabs::-webkit-scrollbar { display: block; width: 4px; }
  .wallet-console-page #workspaceTabs::-webkit-scrollbar-thumb { background: #cbd6db; border-radius: 4px; }
  .wallet-console-page .tab { flex: 0 0 auto; min-height: 39px; justify-content: flex-start; padding: 9px 10px; border: 0; background: transparent; color: #4d5d65; box-shadow: none; }
  .wallet-console-page .tab:hover { background: #f0f4f6; }
  .wallet-console-page .tab.active { background: #e7f4ef; color: #076848; font-weight: 700; }
  .wallet-console-page .tab[data-tab="instant"],
  .wallet-console-page .tab[data-tab="transactions"],
  .wallet-console-page .tab[data-tab="transfers"] { margin-top: 8px; }
  .wallet-console-page .network-settings-details { margin-bottom: 18px; }
  .wallet-console-page .panel-head { top: 0; }
  .wallet-console-page #configsPanel { scroll-margin-top: 0; }
  .wallet-console-page #instantPanel > .panel-head { top: 0; }
}

@media (max-width: 1179px) {
  .wallet-console-page .asset-selection-toolbar { grid-template-columns: 1fr 1fr; }
  .wallet-console-page .asset-selection-toolbar > .actions { grid-column: 1 / -1; }
  .wallet-console-page .asset-selection-toolbar > label:has(#localAssetSearch) { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  .wallet-console-page .shell { width: calc(100% - 20px); padding-top: 10px; }
  .wallet-console-page .topbar { gap: 12px; padding-bottom: 14px; }
  .wallet-console-page .topbar .wallet-box { display: grid; grid-template-columns: 38px minmax(0, 1fr) 38px; width: 100%; }
  .wallet-console-page .topbar #validateLocalConfigBtn span { display: none; }
  .wallet-console-page .local-status-primary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .wallet-console-page .local-status-primary .status-card { min-height: 62px; padding: 8px 10px; }
  .wallet-console-page .local-status-primary .status-card:nth-child(-n+3) { border-bottom: 1px solid var(--line); }
  .wallet-console-page .local-status-primary .status-card:nth-child(3n) { border-right: 0; }
  .wallet-console-page .local-status-primary .status-value { font-size: 15px; }
  .wallet-console-page .panel-head { padding: 12px; }
  .wallet-console-page .asset-selection-toolbar { padding: 10px 12px; gap: 8px; }
  .wallet-console-page .asset-selection-toolbar > .actions { display: flex; justify-content: flex-start; }
  .wallet-console-page .asset-selection-toolbar .actions button { width: auto; }
  .wallet-console-page .asset-selection-toolbar #manageHiddenWalletsBtn { flex: 1; }
  .wallet-console-page .asset-selection-toolbar .icon-only { width: 38px; flex: 0 0 38px; }
  .wallet-console-page .asset-selection-toolbar .toggle-label { min-height: 34px; }
  .wallet-console-page .asset-token-editor > summary { padding: 10px 12px; }
  .wallet-console-page .saved-token-strip { padding: 0 12px 10px; }
  .wallet-console-page .asset-token-fields { padding: 0 12px 12px; }
  .wallet-console-page .panel .summary-card { padding: 8px 12px; }
  .wallet-console-page #assetsPanel > .wallet-scroll { height: 360px; }
}

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

/* Compact console navigation. */
.workspace-search { display: none; }
.console-plugin-link { display: flex; align-items: center; gap: 8px; color: #2257aa; text-decoration: none; font-size: 12px; min-height: 36px; white-space: nowrap; }
.console-plugin-link svg { width: 16px; height: 16px; flex-shrink: 0; }
.console-plugin-link svg:last-child { margin-left: auto; }
.wallet-console-page .tabs-shell { column-gap: 12px; }
@media (min-width: 1180px) {
  .workspace-search { display: flex; gap: 6px; align-items: center; border: 1px solid var(--line); border-radius: 5px; padding: 0 8px; }
  .workspace-search svg { width: 15px; height: 15px; flex-shrink: 0; color: var(--muted); }
  .workspace-search input { width: 100%; min-width: 0; min-height: 34px; border: 0; padding: 0; background: transparent; }
  .wallet-console-page .tabs-shell { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto minmax(0, 1fr) auto; }
  .console-plugin-link { grid-row: 4; padding: 8px; border-top: 1px solid var(--line); }
  .wallet-console-page #workspaceTabs { grid-row: 3; }
}
@media (max-width: 1179px) {
  .console-plugin-link { order: 2; }
  .workspace-jump-label { flex: 1; min-width: 0; }
}
@media (min-width: 861px) {
  .player-status-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .panel .quick-summary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.wallet-console-page .tab[hidden] { display: none !important; }

.plugin-wallet-bar { display: grid; grid-template-columns: auto minmax(160px, 240px) 38px minmax(0, 1fr); align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.plugin-wallet-bar > label { font-size: 12px; color: var(--muted); }
.plugin-wallet-bar > select { width: 100%; min-width: 0; min-height: 38px; }
.plugin-wallet-message { min-width: 0; overflow-wrap: anywhere; font-size: 12px; line-height: 1.6; }
@media (max-width: 640px) {
  .plugin-wallet-bar { grid-template-columns: auto minmax(0, 1fr) 38px; }
  .plugin-wallet-message { grid-column: 1 / -1; }
}
