:root {
  color-scheme: light;
  font-family:
    Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-synthesis: none;
  --font-body: 13px;
  --font-compact: 11px;
  --ink: #171816;
  --muted: #73766f;
  --line: #d9dcd5;
  --surface: #f5f6f2;
  --paper: #ffffff;
  --accent: #26b36a;
  --accent-dark: #14864b;
  --accent-soft: #e8f7ee;
  --warning: #b66d12;
  --danger: #b83c32;
  --focus: #2563eb;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--surface);
  color: var(--ink);
  font-size: var(--font-body);
}

body.modal-open {
  overflow: hidden;
}

button,
input,
textarea,
select {
  font: inherit;
  letter-spacing: 0;
}

button,
label,
select {
  -webkit-tap-highlight-color: transparent;
}

.app-header {
  position: sticky;
  z-index: 10;
  top: 0;
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(245, 246, 242, 0.94);
  backdrop-filter: blur(16px);
}

.brand-block,
.connection-state,
.section-heading,
.table-heading,
.image-field,
.record-count {
  display: flex;
  align-items: center;
}

.brand-block {
  gap: 11px;
}

.settings-trigger {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  place-items: center;
  border: 0;
  border-radius: 6px;
  background: var(--ink);
  color: white;
  cursor: pointer;
  line-height: 1;
  transition:
    background-color 140ms ease,
    transform 140ms ease;
}

.settings-trigger:hover {
  background: #30322e;
}

.settings-trigger:active {
  transform: translateY(1px);
}

.settings-trigger:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

.settings-trigger.is-connected {
  background: var(--accent-dark);
}

.wallet-trigger-icon {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.header-wallet-summary {
  min-width: 0;
  line-height: 1.25;
}

.header-wallet-address {
  max-width: 190px;
  overflow: hidden;
  font-size: 13px;
  font-weight: 720;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-wallet-balance {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.connection-state {
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.state-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #a5a7a2;
}

.connection-state.ready {
  color: var(--accent-dark);
}

.connection-state.ready .state-dot {
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.connection-state.blocked {
  color: var(--danger);
}

.connection-state.blocked .state-dot {
  background: var(--danger);
}

.workspace {
  --editor-closed-width: 410px;
  --drawer-duration: 270ms;
  position: relative;
  display: grid;
  min-height: calc(100vh - 72px);
  grid-template-columns: var(--editor-closed-width) minmax(0, 1fr);
  overflow-x: clip;
}

.editor-panel {
  position: relative;
  z-index: 3;
  width: 100vw;
  min-width: 0;
  padding: 18px 24px 40px;
  background: var(--paper);
  overflow: visible;
  clip-path: inset(0 calc(100% - var(--editor-closed-width)) 0 0);
  transition: clip-path var(--drawer-duration) linear;
  will-change: clip-path;
}

.workspace.is-bulk-open .editor-panel {
  clip-path: inset(0);
}

.editor-panel::after {
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(var(--editor-closed-width) - 1px);
  width: 1px;
  background: var(--line);
  content: "";
  transition: left var(--drawer-duration) linear;
}

.workspace.is-bulk-open .editor-panel::after {
  left: calc(100vw - 1px);
}

.single-token-form {
  width: 100%;
  max-width: 362px;
}

.single-token-form[hidden] {
  display: none;
}

.table-panel {
  position: relative;
  z-index: 1;
  min-width: 0;
  padding: 4px 28px 48px;
  overflow: hidden;
}

.workspace.is-bulk-open .table-panel {
  pointer-events: none;
}

.bulk-drawer-tab {
  position: absolute;
  z-index: 32;
  top: 18px;
  left: calc(var(--editor-closed-width) - 1px);
  display: grid;
  width: 16px;
  height: 38px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-left: 0;
  border-radius: 0 6px 6px 0;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  box-shadow: 3px 2px 8px rgba(23, 24, 22, 0.06);
  transition:
    left var(--drawer-duration) linear,
    background-color 150ms ease,
    color 150ms ease;
}

.bulk-drawer-tab:hover {
  background: var(--paper);
}

.bulk-drawer-tab:hover span {
  border-left-color: #30322e;
}

.bulk-drawer-tab:active {
  transform: none;
}

.bulk-drawer-tab:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.bulk-drawer-tab:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.bulk-drawer-tab span {
  display: block;
  width: 0;
  height: 0;
  border-block: 4px solid transparent;
  border-left: 6px solid #7b7e77;
  font-size: 0;
  transform-origin: 3px 4px;
  transition:
    border-left-color 140ms ease,
    transform var(--drawer-duration) linear;
}

.bulk-drawer-tab[aria-expanded="true"] span {
  transform: rotate(180deg);
}

.workspace.is-bulk-open .bulk-drawer-tab {
  left: calc(100vw - 16px);
  border-left: 1px solid var(--line);
  border-radius: 6px 0 0 6px;
}

.bulk-drawer {
  min-width: 0;
  height: calc(100vh - 130px);
  min-height: 520px;
}

.bulk-drawer[hidden] {
  display: none;
}

.bulk-token-form {
  display: grid;
  height: 100%;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 12px;
}

.bulk-form-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.bulk-form-heading > div {
  display: grid;
  gap: 3px;
}

.bulk-form-heading strong {
  font-size: 14px;
}

.bulk-form-heading > div > span {
  color: var(--muted);
  font-size: var(--font-compact);
}

.bulk-form-heading .bulk-submit-action {
  width: auto;
  min-width: 116px;
  height: 38px;
  flex: 0 0 auto;
  padding: 0 16px;
}

.bulk-form-heading .bulk-submit-action:not(:disabled) {
  color: #ffffff;
}

.bulk-table-shell {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  border: 1px solid #cfd3ca;
  background: var(--paper);
}

.bulk-entry-table {
  min-width: 1900px;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
}

.bulk-entry-table th,
.bulk-entry-table td {
  height: 36px;
  padding: 0;
  border-right: 1px solid #d9ddd4;
  border-bottom: 1px solid #d9ddd4;
  vertical-align: middle;
}

.bulk-entry-table th {
  position: sticky;
  z-index: 2;
  top: 0;
  height: 32px;
  padding: 0 8px;
  background: #eef1eb;
  color: #555951;
  font-size: 10px;
  text-align: left;
  text-transform: none;
  white-space: nowrap;
}

.bulk-entry-table th:first-child,
.bulk-entry-table td:first-child {
  position: sticky;
  z-index: 1;
  left: 0;
  background: #f4f6f1;
}

.bulk-entry-table th:first-child {
  z-index: 3;
}

.bulk-entry-table tr:last-child td {
  border-bottom: 0;
}

.bulk-entry-table th:last-child,
.bulk-entry-table td:last-child {
  border-right: 0;
}

.bulk-entry-table tfoot td {
  position: sticky;
  left: 0;
  height: 38px;
  padding: 0;
  border-right: 0;
  background: var(--paper);
}

.bulk-add-row-line {
  display: flex;
  width: 100%;
  height: 37px;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #9a9d96;
  cursor: pointer;
  font-size: 13px;
  font-weight: 560;
  text-align: left;
}

.bulk-add-row-line span {
  color: #b0b3ac;
  font-size: 23px;
  font-weight: 300;
  line-height: 1;
}

.bulk-add-row-line:hover {
  background: #f5f6f2;
  color: #62655f;
}

.bulk-add-row-line:hover span {
  color: #7d8079;
}

.bulk-entry-table th:nth-child(1),
.bulk-entry-table td:nth-child(1) {
  width: 38px;
  text-align: center;
}

.bulk-entry-table th:nth-child(2),
.bulk-entry-table td:nth-child(2) {
  width: 126px;
}

.bulk-entry-table th:nth-child(3),
.bulk-entry-table td:nth-child(3) {
  width: 160px;
}

.bulk-entry-table th:nth-child(4),
.bulk-entry-table td:nth-child(4) {
  width: 100px;
}

.bulk-entry-table th:nth-child(5),
.bulk-entry-table td:nth-child(5) {
  width: 210px;
}

.bulk-entry-table th:nth-child(6),
.bulk-entry-table td:nth-child(6),
.bulk-entry-table th:nth-child(7),
.bulk-entry-table td:nth-child(7),
.bulk-entry-table th:nth-child(8),
.bulk-entry-table td:nth-child(8) {
  width: 180px;
}

.bulk-entry-table th:nth-child(9),
.bulk-entry-table td:nth-child(9),
.bulk-entry-table th:nth-child(10),
.bulk-entry-table td:nth-child(10),
.bulk-entry-table th:nth-child(11),
.bulk-entry-table td:nth-child(11) {
  width: 112px;
}

.bulk-entry-table th:nth-child(12),
.bulk-entry-table td:nth-child(12) {
  width: 86px;
}

.bulk-entry-table th:nth-child(13),
.bulk-entry-table td:nth-child(13) {
  width: 150px;
}

.bulk-entry-table th:nth-child(14),
.bulk-entry-table td:nth-child(14) {
  width: 42px;
}

.bulk-entry-table input,
.bulk-entry-table textarea,
.bulk-entry-table select {
  display: block;
  width: 100%;
  height: 35px;
  min-height: 35px;
  padding: 0 8px;
  border: 0;
  border-radius: 0;
  outline: none;
  background: var(--paper);
  font-size: 12px;
  box-shadow: none;
}

.bulk-entry-table input:focus,
.bulk-entry-table textarea:focus,
.bulk-entry-table select:focus {
  position: relative;
  z-index: 1;
  background: #fff;
  box-shadow: inset 0 0 0 2px var(--focus);
}

.bulk-entry-table textarea {
  padding-block: 9px 7px;
  resize: none;
  line-height: 1.35;
}

.bulk-entry-table tr.is-error {
  background: transparent;
}

.bulk-entry-table tr.is-complete {
  background: transparent;
}

.bulk-entry-table tr.is-error td {
  background: #fff2f0;
}

.bulk-entry-table tr.is-complete td {
  background: var(--accent-soft);
}

.bulk-row-index {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: var(--font-compact);
}

.bulk-image-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.bulk-image-picker {
  display: grid;
  width: 100%;
  height: 35px;
  place-items: center;
  overflow: hidden;
  padding: 0 8px;
  border: 0;
  border-radius: 0;
  background: var(--paper);
  color: var(--muted);
  cursor: pointer;
  font-size: var(--font-compact);
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bulk-image-picker:hover,
.bulk-image-picker.has-image {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.bulk-image-picker.is-invalid {
  background: #fff2f0;
  color: var(--danger);
}

.bulk-row-status {
  display: block;
  overflow: hidden;
  padding: 0 8px;
  color: var(--muted);
  font-size: var(--font-compact);
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bulk-entry-table tr.is-error .bulk-row-status {
  color: var(--danger);
  font-weight: 680;
}

.bulk-entry-table tr.is-complete .bulk-row-status {
  color: var(--accent-dark);
  font-weight: 680;
}

.bulk-remove-row {
  display: grid;
  width: 100%;
  height: 35px;
  place-items: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 19px;
  line-height: 1;
}

.bulk-remove-row:hover {
  background: #fff2f0;
  color: var(--danger);
}

.bulk-remove-row:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

.section-heading {
  min-height: 54px;
  justify-content: space-between;
  margin-bottom: 24px;
}

.section-index {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  font-size: 23px;
  line-height: 1.2;
  letter-spacing: 0;
}

.mode-badge {
  padding: 5px 8px;
  border: 1px solid #b9bcb6;
  border-radius: 5px;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

form,
.field-stack {
  display: grid;
  gap: 14px;
}

.field-pair,
.launch-fields {
  display: grid;
  gap: 12px;
}

.field-pair {
  grid-template-columns: minmax(0, 1fr) minmax(110px, 0.6fr);
}

.launch-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding-top: 4px;
}

.field {
  display: grid;
  min-width: 0;
  gap: 7px;
}

.field > span {
  color: #4f524d;
  font-size: var(--font-body);
  font-weight: 680;
}

.field-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.field-limit {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: var(--font-compact);
  font-weight: 600;
}

input,
textarea,
select {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  outline: none;
  background: #fbfcf9;
  color: var(--ink);
  font-size: var(--font-body);
  transition:
    border-color 140ms ease,
    box-shadow 140ms ease,
    background-color 140ms ease;
}

input,
select {
  height: 42px;
  padding: 0 11px;
}

textarea {
  min-height: 78px;
  resize: vertical;
  padding: 10px 11px;
  line-height: 1.45;
}

input::placeholder,
textarea::placeholder {
  color: #a1a49d;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--focus);
  background: var(--paper);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.image-field {
  min-height: 72px;
  gap: 13px;
  padding: 9px;
  border: 1px dashed #bfc3bb;
  border-radius: 6px;
  cursor: pointer;
  background: #fafbf8;
  transition:
    border-color 140ms ease,
    background-color 140ms ease;
}

.image-field:hover,
.image-field.has-image {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.image-field input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.image-preview {
  display: grid;
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  overflow: hidden;
  place-items: center;
  border-radius: 5px;
  background: #e4e7e0;
}

.image-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-placeholder {
  color: #70746d;
  font-size: 24px;
  font-weight: 300;
}

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

.image-copy strong {
  font-size: var(--font-body);
}

.image-copy span {
  overflow: hidden;
  color: var(--muted);
  font-size: var(--font-compact);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.form-errors {
  padding: 10px 12px;
  border-left: 3px solid var(--danger);
  background: #fff3f1;
  color: #8f2f27;
  font-size: var(--font-body);
  line-height: 1.5;
}

.form-errors ul {
  margin: 0;
  padding-left: 18px;
}

.primary-action {
  position: relative;
  display: grid;
  width: 100%;
  height: 44px;
  place-items: center;
  overflow: hidden;
  border: 0;
  border-radius: 6px;
  background: var(--ink);
  color: white;
  cursor: pointer;
  font-size: var(--font-body);
  font-weight: 760;
  transition:
    background-color 140ms ease,
    transform 140ms ease;
}

.primary-action:hover {
  background: #30322e;
}

.primary-action:active {
  transform: translateY(1px);
}

.primary-action:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.button-progress {
  position: absolute;
  inset: auto 0 0;
  height: 3px;
  background: var(--accent);
  transform: translateX(-100%);
}

.primary-action.loading .button-progress {
  animation: progress 1.1s ease-in-out infinite;
}

@keyframes progress {
  50% {
    transform: translateX(30%);
  }
  100% {
    transform: translateX(100%);
  }
}

.upload-action,
.delete-action {
  height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: 6px;
  background: var(--ink);
  color: white;
  cursor: pointer;
  font-size: var(--font-body);
  font-weight: 760;
  transition:
    background-color 140ms ease,
    opacity 140ms ease,
    transform 140ms ease;
}

.upload-action:hover {
  background: #30322e;
}

.upload-action:active,
.delete-action:active {
  transform: translateY(1px);
}

.upload-action:disabled,
.delete-action:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.delete-action {
  min-width: 76px;
  border: 1px solid #c94439;
  background: #b83c32;
  color: white;
  opacity: 0;
  pointer-events: none;
  transform: translateX(4px);
  visibility: hidden;
}

.delete-action:hover {
  background: #963027;
}

.delete-action.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
  visibility: visible;
}

.delete-action:not(.is-visible) {
  opacity: 0;
}

.token-toolbar {
  display: flex;
  min-height: 46px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.token-tabs {
  display: flex;
  gap: 22px;
}

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

.table-actions[hidden] {
  display: none;
}

.selection-count {
  color: var(--muted);
  font-size: var(--font-compact);
  font-weight: 700;
  opacity: 0;
  transform: translateX(4px);
  transition:
    color 140ms ease,
    opacity 140ms ease,
    transform 140ms ease;
}

.selection-count.has-selection {
  color: var(--ink);
  opacity: 1;
  transform: translateX(0);
}

.token-tab {
  position: relative;
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  gap: 8px;
  padding: 0 1px;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: var(--font-body);
  font-weight: 720;
  transition:
    color 160ms ease,
    transform 160ms ease;
}

.token-tab::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: var(--ink);
  content: "";
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 180ms ease;
}

.token-tab:hover,
.token-tab.is-active {
  color: var(--ink);
}

.token-tab:active {
  transform: translateY(1px);
}

.token-tab:focus-visible {
  border-radius: 4px;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.token-tab.is-active::after {
  transform: scaleX(1);
}

.tab-count {
  display: grid;
  min-width: 20px;
  height: 20px;
  place-items: center;
  padding: 0 6px;
  border-radius: 4px;
  background: #e5e7e1;
  color: #555851;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9px;
  transition:
    background-color 160ms ease,
    color 160ms ease;
}

.token-tab.is-active .tab-count {
  background: var(--ink);
  color: white;
}

.token-view:not([hidden]) {
  animation: token-view-in 190ms ease-out;
}

.token-view[hidden] {
  display: none;
}

@keyframes token-view-in {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.table-shell {
  position: relative;
  min-height: 280px;
  overflow-x: auto;
  border-top: 1px solid var(--ink);
  background: var(--paper);
}

table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
}

.launched-table-shell table {
  min-width: 760px;
}

.selection-column {
  width: 44px;
  min-width: 44px;
  padding-inline: 8px;
  text-align: center;
  vertical-align: middle;
}

th,
td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  height: 42px;
  color: var(--muted);
  font-size: var(--font-compact);
  font-weight: 760;
  text-transform: uppercase;
}

td {
  font-size: var(--font-body);
}

tbody tr {
  transition: background-color 140ms ease;
}

tbody tr.is-selected {
  background: #f0f5ed;
}

tbody tr.has-error,
tbody tr.has-error.is-selected {
  background: #fff2f0;
}

tbody tr.has-error td:first-child {
  box-shadow: inset 3px 0 0 var(--danger);
}

.checkbox-control {
  display: inline-grid;
  width: 22px;
  height: 22px;
  margin-inline: auto;
  place-items: center;
  cursor: pointer;
  vertical-align: middle;
}

.checkbox-control input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
}

.checkbox-control span {
  position: relative;
  display: grid;
  width: 16px;
  height: 16px;
  place-items: center;
  border: 1px solid #aeb3aa;
  border-radius: 4px;
  background: #fbfcf9;
  transition:
    background-color 140ms ease,
    border-color 140ms ease,
    box-shadow 140ms ease;
}

.checkbox-control input:checked + span,
.checkbox-control input:indeterminate + span {
  border-color: var(--ink);
  background: var(--ink);
}

.checkbox-control input:checked + span::after {
  width: 4px;
  height: 8px;
  border: solid white;
  border-width: 0 2px 2px 0;
  content: "";
  transform: rotate(45deg);
}

.checkbox-control input:indeterminate + span::after {
  width: 8px;
  height: 2px;
  border-radius: 999px;
  background: white;
  content: "";
}

.checkbox-control input:focus-visible + span {
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.token-cell {
  display: grid;
  min-width: 150px;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 9px;
}

.token-thumbnail {
  display: grid;
  width: 34px;
  height: 34px;
  overflow: hidden;
  place-items: center;
  border-radius: 5px;
  background: #e4e7e0;
}

.token-thumbnail-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.token-thumbnail-fallback {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  background: var(--ink);
  color: white;
  font-size: 10px;
  font-weight: 800;
}

.token-name {
  overflow: hidden;
  font-weight: 740;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.token-symbol {
  margin-top: 4px;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: var(--font-compact);
}

.token-failure {
  max-width: 230px;
  margin-top: 5px;
  overflow: hidden;
  color: var(--danger);
  font-size: var(--font-compact);
  font-weight: 680;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.uri-cell {
  max-width: 230px;
}

.uri-value {
  display: block;
  overflow: hidden;
  color: #215b91;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: var(--font-compact);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.copy-button,
.payload-toggle {
  margin-top: 7px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: var(--font-compact);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.copy-button:hover,
.payload-toggle:hover {
  color: var(--ink);
}

.number-value {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: var(--font-compact);
  white-space: nowrap;
}

.disabled-value {
  color: var(--muted);
}

.address-value {
  display: block;
  max-width: 180px;
  overflow: hidden;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: var(--font-compact);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.external-link {
  color: #215b91;
  font-size: var(--font-compact);
  font-weight: 700;
  text-underline-offset: 3px;
}

.date-value {
  color: var(--muted);
  font-size: var(--font-compact);
  white-space: nowrap;
}

.pool-value {
  display: inline-flex;
  height: 24px;
  align-items: center;
  padding: 0 7px;
  border-radius: 4px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: var(--font-compact);
  font-weight: 750;
}

.payload-row td {
  padding: 0;
  background: #f4f6f1;
}

.payload-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}

.json-block {
  min-width: 0;
  padding: 14px;
  background: #f8f9f6;
}

.json-block strong {
  display: block;
  margin-bottom: 8px;
  font-size: 10px;
  text-transform: uppercase;
}

pre {
  max-height: 240px;
  margin: 0;
  overflow: auto;
  color: #363934;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.empty-state {
  display: grid;
  min-height: 238px;
  place-items: center;
  align-content: center;
  gap: 8px;
  color: var(--muted);
}

.empty-state[hidden] {
  display: none;
}

.empty-index {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
}

.empty-state strong {
  font-size: 13px;
}

.empty-state > span:last-child:not(.empty-index) {
  max-width: 300px;
  text-align: center;
  font-size: 11px;
}

.modal-layer {
  position: fixed;
  z-index: 40;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(23, 24, 22, 0.52);
  backdrop-filter: blur(4px);
}

.modal-layer[hidden] {
  display: none;
}

.confirmation-dialog {
  width: min(680px, 100%);
  max-height: min(760px, calc(100vh - 40px));
  overflow: auto;
  padding: 22px;
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 24px 70px rgba(20, 22, 19, 0.24);
  animation: dialog-in 180ms ease-out;
}

.wallet-dialog {
  width: min(560px, 100%);
}

.wallet-connection {
  display: grid;
  gap: 16px;
}

.wallet-status-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-block: 1px solid var(--line);
}

.wallet-status-line span {
  color: var(--muted);
  font-size: var(--font-compact);
  font-weight: 700;
  text-transform: uppercase;
}

.wallet-status-line strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wallet-public-data {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 18px;
  padding: 12px;
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
}

.wallet-public-data[hidden] {
  display: none;
}

.wallet-public-data > div {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.wallet-public-data span,
.wallet-public-data p {
  color: var(--muted);
  font-size: var(--font-compact);
}

.wallet-public-data code {
  overflow: hidden;
  font-size: var(--font-compact);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wallet-public-data strong {
  white-space: nowrap;
}

.wallet-public-data p {
  grid-column: 1 / -1;
  margin: 0;
}

.wallet-safety-note {
  padding: 11px 12px;
  border-left: 3px solid var(--warning);
  background: #fff8eb;
  color: #6d4d1d;
  font-size: var(--font-compact);
  line-height: 1.5;
}

.wallet-actions {
  margin-top: 0;
}

@keyframes dialog-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.dialog-heading h2 {
  margin: 0;
}

.dialog-close {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  border: 0;
  border-radius: 5px;
  background: #eef0eb;
  color: var(--ink);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.dialog-close:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.dialog-description {
  max-width: 560px;
  margin: 12px 0 18px;
  color: var(--muted);
  line-height: 1.5;
}

.launch-summary {
  display: grid;
  max-height: 390px;
  margin-top: 18px;
  overflow: auto;
  border-top: 1px solid var(--line);
}

.launch-summary-item {
  display: grid;
  grid-template-columns: minmax(170px, 0.8fr) minmax(300px, 1.2fr);
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.launch-summary-identity {
  display: grid;
  min-width: 0;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.launch-summary-identity img {
  width: 40px;
  height: 40px;
  border-radius: 5px;
  background: #e4e7e0;
  object-fit: cover;
}

.launch-summary-identity strong,
.launch-summary-identity span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.launch-summary-identity span {
  margin-top: 4px;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: var(--font-compact);
}

.launch-summary dl {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.launch-summary dt {
  color: var(--muted);
  font-size: var(--font-compact);
}

.launch-summary dd {
  margin: 5px 0 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: var(--font-compact);
  font-weight: 700;
}

.transaction-review {
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.transaction-review summary {
  width: fit-content;
  color: var(--muted);
  cursor: pointer;
  font-size: var(--font-compact);
  font-weight: 680;
}

.transaction-review summary:hover {
  color: var(--ink);
}

.transaction-review dl {
  display: grid;
  grid-template-columns: minmax(76px, auto) minmax(0, 1fr);
  gap: 7px 12px;
  margin: 12px 0 0;
  padding: 10px 12px;
  background: #f4f6f1;
}

.transaction-review dt {
  color: var(--muted);
  font-size: var(--font-compact);
}

.transaction-review dd {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: var(--font-compact);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.launch-notice {
  margin-top: 14px;
  padding: 10px 12px;
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  color: #286140;
  font-size: var(--font-compact);
  line-height: 1.4;
}

.launch-notice.is-error {
  border-left-color: var(--danger);
  background: #fff2f0;
  color: #8f2f27;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.secondary-action,
.confirm-action {
  height: 38px;
  padding: 0 14px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 740;
}

.secondary-action {
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
}

.confirm-action {
  min-width: 176px;
  border: 0;
  background: var(--ink);
  color: white;
}

.secondary-action:disabled,
.confirm-action:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.toast {
  position: fixed;
  z-index: 20;
  right: 24px;
  bottom: 24px;
  max-width: min(360px, calc(100vw - 32px));
  padding: 12px 14px;
  border-radius: 6px;
  background: var(--ink);
  color: white;
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 960px) {
  .workspace {
    --editor-closed-width: 360px;
  }

  .editor-panel {
    padding-inline: 18px;
  }

  .table-panel {
    padding-inline: 20px;
  }
}

@media (max-width: 760px) {
  .app-header {
    min-height: 64px;
    padding: 10px 16px;
  }

  .connection-state {
    max-width: 150px;
    text-align: right;
  }

  .workspace {
    --editor-closed-width: min(410px, calc(100vw - 16px));
    display: grid;
    grid-template-columns: var(--editor-closed-width) minmax(0, 1fr);
  }

  .editor-panel {
    width: 100vw;
    clip-path: inset(0 calc(100% - var(--editor-closed-width)) 0 0);
  }

  .workspace.is-bulk-open .editor-panel {
    width: 100vw;
    clip-path: inset(0);
  }

  .editor-panel::after,
  .workspace.is-bulk-open .editor-panel::after {
    display: none;
  }

  .workspace.is-bulk-open .table-panel {
    display: none;
  }

  .editor-panel {
    padding: 22px 16px 30px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .workspace.is-bulk-open .editor-panel {
    padding-inline: 16px;
  }

  .bulk-drawer-tab {
    top: 16px;
    left: calc(var(--editor-closed-width) - 1px);
    width: 16px;
    height: 38px;
    border-left: 0;
    border-radius: 0 6px 6px 0;
  }

  .workspace.is-bulk-open .bulk-drawer-tab {
    top: 16px;
    right: 0;
    left: auto;
    width: 16px;
    height: 38px;
    border-left: 1px solid var(--line);
    border-radius: 6px 0 0 6px;
  }

  .bulk-drawer {
    height: calc(100vh - 118px);
    min-height: 460px;
  }

  .bulk-form-heading {
    align-items: flex-end;
    padding-right: 24px;
  }

  .table-panel {
    padding: 4px 16px 36px;
  }

  .field-pair,
  .launch-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .table-actions {
    align-items: flex-end;
  }

  .token-toolbar {
    align-items: stretch;
    gap: 12px;
  }

  .token-tabs {
    min-width: 0;
    flex: 1;
    gap: 18px;
    overflow-x: auto;
  }

  .table-actions {
    flex: 0 0 auto;
  }

  .payload-panel {
    grid-template-columns: 1fr;
  }

  .confirmation-dialog {
    padding: 18px;
  }

  .launch-summary-item {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .dialog-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .toast {
    right: 16px;
    bottom: 16px;
  }
}

@media (max-width: 430px) {
  .settings-trigger {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
  }

  .wallet-trigger-icon {
    width: 19px;
    height: 19px;
  }

  .header-wallet-address {
    max-width: 118px;
    font-size: 12px;
  }

  .header-wallet-balance {
    font-size: 10px;
  }

  .connection-state {
    max-width: 120px;
    font-size: 10px;
  }

  h1,
  h2 {
    font-size: 20px;
  }

  .field-pair,
  .launch-fields {
    grid-template-columns: 1fr;
  }

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

  .wallet-public-data {
    grid-template-columns: 1fr;
  }

  .wallet-public-data p {
    grid-column: auto;
  }

  .dialog-actions {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
