/* 1. Slate 冷灰基底与 Emerald 交互色，和链上工作台统一。 */
:root {
  --bg-canvas: #f8fafc;
  --bg-surface: #ffffff;
  --bg-subtle: #f1f5f9;
  --bg-hover: #f1f5f9;
  --bg-active: #e2e8f0;
  --ink-primary: #0f172a;
  --ink-secondary: #334155;
  --ink-muted: #64748b;
  --ink-faint: #94a3b8;
  --line-subtle: #eef2f6;
  --line-default: #e2e8f0;
  --line-strong: #cbd5e1;
  --brand: #059669;
  --brand-hover: #047857;
  --brand-soft: #ecfdf5;
  --brand-border: #a7f3d0;
  --brand-ink: #065f46;
  --ok-bg: #dcfce7;
  --ok-ink: #15803d;
  --warn-bg: #fef3c7;
  --warn-ink: #b45309;
  --err-bg: #fee2e2;
  --err-ink: #b91c1c;
  --info-bg: #e0f2fe;
  --info-ink: #0369a1;
  --font-sans: -apple-system, BlinkMacSystemFont, "Inter", "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", "Menlo", "Consolas", "Liberation Mono", monospace;
  --radius-sm: 5px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 2px rgb(15 23 42 / 4%);
  --shadow-pop: 0 10px 30px -5px rgb(15 23 42 / 14%), 0 4px 10px -2px rgb(15 23 42 / 6%);
  --shadow-drawer: -12px 0 40px rgb(15 23 42 / 16%);
}

/* 2. 顶栏、导航、基本控件和紧凑指标。 */
* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  color-scheme: light;
}

body {
  margin: 0;
  background: var(--bg-canvas);
  color: var(--ink-primary);
  font: 12.5px/1.5 var(--font-sans);
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--brand-hover);
}

button, input, select {
  font: inherit;
}

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

button {
  cursor: pointer;
}

button:disabled {
  opacity: .4;
  cursor: default;
}

button, input, select {
  outline-offset: 3px;
}

:focus-visible {
  outline: 2px solid var(--brand);
}

input, select {
  width: 100%;
  min-width: 0;
  height: 32px;
  padding: 5px 9px;
  border: 1px solid var(--line-default);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  color: var(--ink-primary);
  font-size: 12px;
}

input::placeholder {
  color: var(--ink-faint);
}

input:focus, select:focus {
  border-color: var(--brand);
}

.icon {
  display: inline-block;
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  vertical-align: middle;
  pointer-events: none;
}

.btn, .icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 32px;
  border: 1px solid var(--line-default);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  color: var(--ink-secondary);
  white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s;
}

.btn {
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 500;
}

.icon-btn {
  width: 26px;
  height: 26px;
  padding: 0;
}

.btn:hover, .icon-btn:hover {
  background: var(--bg-hover);
  border-color: var(--line-strong);
}

.primary {
  background: var(--brand);
  border-color: var(--brand);
  color: white;
}

.primary:hover {
  background: var(--brand-hover);
  border-color: var(--brand-hover);
  color: white;
}

.ghost {
  border-color: transparent;
  background: transparent;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 18px;
  position: sticky;
  top: 0;
  z-index: 30;
  height: 48px;
  padding: 0 20px;
  border-bottom: 1px solid var(--line-default);
  background: var(--bg-surface);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  font-size: 15px;
  font-weight: 750;
  letter-spacing: .4px;
}

.brand-mark {
  width: 9px;
  height: 15px;
  transform: skew(-18deg);
  border-radius: 1px;
  background: var(--brand);
}

.product-switch {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  background: var(--bg-subtle);
  border-radius: 6px;
}

.product-switch a {
  padding: 3px 10px;
  font-size: 12px;
  color: var(--ink-muted);
  white-space: nowrap;
}

.product-switch .active {
  border-radius: 4px;
  background: white;
  box-shadow: var(--shadow-sm);
  color: var(--ink-primary);
  font-weight: 600;
}

.top-links {
  display: flex;
  gap: 14px;
  color: var(--ink-muted);
  font-size: 11px;
}

.top-links a {
  display: flex;
  align-items: center;
  gap: 4px;
}

.topbar-status {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-left: auto;
  min-width: 0;
}

.status-chip {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  min-width: 0;
  padding: 4px 8px;
  border: 1px solid var(--line-default);
  border-radius: 20px;
  background: white;
  color: var(--ink-muted);
  font-size: 10.5px;
  white-space: nowrap;
}

.status-chip.warning {
  color: var(--warn-ink);
  background: #fffbeb;
  border-color: #fde68a;
}

.status-chip.error {
  color: var(--err-ink);
  background: #fef2f2;
  border-color: #fecaca;
}

.status-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--brand);
  flex: 0 0 auto;
}

.warning .status-dot {
  background: #d97706;
}

.error .status-dot {
  background: #dc2626;
}

.auth-chip {
  color: var(--ink-secondary);
}

.auth-chip.authorized {
  color: var(--brand-ink);
  border-color: var(--brand-border);
  background: var(--brand-soft);
}

.subnav {
  display: flex;
  gap: 18px;
  align-items: center;
  height: 38px;
  padding: 0 20px;
  border-bottom: 1px solid var(--line-default);
  background: white;
}

.viewnav {
  display: flex;
  align-items: stretch;
  align-self: stretch;
  gap: 20px;
  flex: 0 0 auto;
}

.viewnav button {
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 0 2px;
  background: none;
  color: var(--ink-muted);
  font-size: 12px;
  white-space: nowrap;
}

.viewnav button.active {
  border-bottom-color: var(--brand);
  color: var(--brand-ink);
  font-weight: 600;
}

.metrics-inline {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 15px;
  margin-left: auto;
  font-size: 10.5px;
  color: var(--ink-muted);
  min-width: 0;
}

.metric {
  display: flex;
  align-items: baseline;
  gap: 5px;
  white-space: nowrap;
}

.metric b {
  color: var(--ink-secondary);
  font: 600 12px var(--font-mono);
}

.workspace {
  padding: 14px 20px 0;
}

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

.mono, .money, .num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.muted {
  color: var(--ink-muted);
}

.sub {
  display: block;
  color: var(--ink-muted);
  font-size: 10.5px;
  line-height: 1.4;
  margin-top: 2px;
}

.wrap {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* 3. 高频筛选与列表状态。 */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
}

.search-input {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 180px;
  flex: 1 1 250px;
}

.search-input > .icon {
  position: absolute;
  left: 9px;
  color: var(--ink-faint);
}

.search-input input {
  padding-left: 30px;
}

.desktop-filter-slot {
  display: contents;
}

.filter-fields {
  display: flex;
  gap: 8px;
  flex: 0 1 auto;
  min-width: 0;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.field > span {
  color: var(--ink-muted);
  font-size: 11px;
}

.filter-bar .field > span {
  display: none;
}

.filter-bar .field {
  width: 125px;
}

.filter-bar .currency-field {
  width: 102px;
}

.range-fields {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.filter-bar .range-fields .field {
  width: 90px;
}

.range-dash {
  color: var(--ink-faint);
}

.mobile-filter-button {
  display: none;
}

.count-pill {
  border-radius: 12px;
  padding: 0 5px;
  background: var(--brand-soft);
  color: var(--brand-ink);
  font-size: 10px;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 40px;
  margin-top: 4px;
}

.toolbar-left, .toolbar-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.toolbar-left {
  flex-wrap: wrap;
  flex: 1;
  font-size: 11px;
  color: var(--ink-muted);
}

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

.filter-chips {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 23px;
  max-width: 190px;
  border: 1px solid var(--brand-border);
  border-radius: 4px;
  padding: 1px 6px;
  background: var(--brand-soft);
  color: var(--brand-ink);
  font-size: 10.5px;
}

.filter-chip .chip-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.filter-chip .icon {
  width: 11px;
  height: 11px;
}

.clear-chips {
  border: 0;
  background: none;
  color: var(--ink-muted);
  padding: 3px;
  font-size: 10px;
}

.refresh-state {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  color: var(--ink-muted);
}

.refresh-state.paused {
  color: var(--warn-ink);
}

.refresh-state.paused .status-dot {
  background: #d97706;
}

.sort-label select {
  width: 135px;
  height: 28px;
  padding: 3px 7px;
  font-size: 11px;
}

.query-error, .snapshot-banner {
  border: 1px solid #fde68a;
  border-radius: 6px;
  padding: 7px 10px;
  margin: 0 0 8px;
  color: var(--warn-ink);
  background: #fffbeb;
  font-size: 11px;
}

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

.snapshot-banner .btn {
  color: var(--warn-ink);
}

.list-region {
  position: relative;
  min-height: 180px;
}

.loading-line {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 4;
  overflow: hidden;
  background: var(--brand-soft);
}

.loading-line::after {
  content: "";
  display: block;
  width: 40%;
  height: 100%;
  background: var(--brand);
  animation: progress 1s ease-in-out infinite;
}

.list-region[aria-busy="true"] .loading-line {
  display: block;
}

.list-region[aria-busy="true"] .table-shell, .list-region[aria-busy="true"] .mobile-list {
  opacity: .6;
}

.empty {
  text-align: center;
  padding: 50px 20px;
  color: var(--ink-muted);
  border: 1px solid var(--line-default);
  border-radius: var(--radius-md);
  background: white;
  font-size: 12px;
}

/* 4. 高密度表格，列宽自适应而不依赖水平滚动。 */
.table-shell {
  border: 1px solid var(--line-default);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  overflow: auto;
  max-height: calc(100vh - 225px);
  scrollbar-gutter: stable;
}

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  font-size: 12px;
}

.data-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  height: 36px;
  padding: 7px 8px;
  background: var(--bg-subtle);
  color: var(--ink-muted);
  font-size: 10.5px;
  font-weight: 600;
  border-bottom: 1px solid var(--line-default);
  text-align: left;
  white-space: nowrap;
}

.data-table td {
  position: relative;
  height: 48px;
  padding: 4px 8px;
  border-bottom: 1px solid var(--line-subtle);
  overflow: hidden;
  vertical-align: middle;
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.data-table tbody tr {
  cursor: pointer;
}

.data-table tbody tr:hover {
  background: var(--bg-hover);
}

.data-table tbody tr.selected {
  background: var(--brand-soft);
  box-shadow: inset 3px 0 var(--brand);
}

.data-table th.align-right, .data-table td.align-right {
  text-align: right;
}

.nft-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.nft-image, .nft-placeholder {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 5px;
  flex: 0 0 40px;
  background: var(--bg-subtle);
}

.nft-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-faint);
  font-size: 10px;
}

.nft-name {
  font-size: 12px;
  font-weight: 600;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nft-meta {
  min-width: 0;
}

.nft-meta .sub {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 10px;
}

.money {
  font-weight: 600;
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.currency {
  font: 500 10.5px var(--font-sans);
  color: var(--ink-muted);
}

.badge {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  border-radius: 4px;
  padding: 2px 6px;
  background: var(--bg-subtle);
  color: var(--ink-secondary);
  font-size: 10.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.badge.active {
  color: var(--brand-ink);
  background: var(--brand-soft);
}

.badge.bidding {
  color: #6d28d9;
  background: #f3e8ff;
}

.badge.cancelled {
  color: var(--warn-ink);
  background: #fffbeb;
}

.badge.scheduled {
  color: var(--info-ink);
  background: var(--info-bg);
}

.badge.history {
  color: var(--ink-muted);
}

.badge.warning {
  color: var(--warn-ink);
  background: var(--warn-bg);
}

.mobile-list {
  display: none;
}

.list-footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 9px 0;
}

.pagination {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 11px;
  flex: 0 0 auto;
}

.page-size {
  color: var(--ink-muted);
  font-size: 10px;
  margin-right: 5px;
}

.coverage {
  color: var(--ink-muted);
  font-size: 10.5px;
  flex: 1;
  min-width: 0;
}

.coverage > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 5px 0;
}

.coverage > summary::before {
  content: "";
  width: 5px;
  height: 5px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(-45deg);
  margin-left: 2px;
}

.coverage[open] > summary::before {
  transform: rotate(45deg);
}

.coverage-body {
  max-width: 850px;
  line-height: 1.8;
  padding-top: 4px;
}

.coverage-body p {
  margin: 6px 0;
}

.run-list {
  display: grid;
  gap: 5px;
  margin: 10px 0;
}

.run-item {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 5px 0;
  border-bottom: 1px solid var(--line-default);
}

/* 5. 地址实体、外链和复制微反馈。 */
.address-chip {
  display: inline-flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  max-width: 100%;
  vertical-align: middle;
}

.address-main {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  min-width: 0;
  max-width: 100%;
  color: var(--ink-secondary);
  white-space: nowrap;
}

.address-main:hover {
  color: var(--brand);
}

.address-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 145px;
  min-width: 0;
}

.address-tail {
  color: var(--ink-faint);
  font: 10px var(--font-mono);
  flex-shrink: 0;
}

.address-full {
  color: var(--ink-muted);
  font-size: 10px;
  overflow-wrap: anywhere;
  word-break: break-all;
  margin-top: 3px;
}

.entity-actions {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 20px;
}

.entity-actions .icon-btn {
  width: 24px;
  height: 22px;
  border-color: transparent;
  background: transparent;
  color: var(--ink-faint);
}

.entity-actions .icon-btn:hover {
  color: var(--brand);
  background: var(--brand-soft);
}

.entity-actions .icon {
  width: 12px;
  height: 12px;
}

.icon-btn.copied {
  color: var(--brand) !important;
  background: var(--brand-soft) !important;
}

.hash-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  max-width: 100%;
  min-width: 0;
}

.hash-chip > a {
  font: 10.5px var(--font-mono);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink-secondary);
}

.hash-chip .icon-btn {
  width: 23px;
  height: 23px;
  background: transparent;
  border-color: transparent;
}

/* 6. 详情抽屉、底部面板和共享管理操作。 */
dialog {
  color: var(--ink-primary);
}

dialog::backdrop {
  background: rgb(15 23 42 / 22%);
  backdrop-filter: blur(1px);
}

.drawer {
  position: fixed;
  inset: 0 0 0 auto;
  margin: 0;
  padding: 0;
  width: 640px;
  max-width: min(86vw, 640px);
  height: 100dvh;
  max-height: none;
  border: 0;
  border-left: 1px solid var(--line-default);
  border-radius: 0;
  background: white;
  box-shadow: var(--shadow-drawer);
  overflow: hidden;
}

.drawer[open] {
  display: flex;
  flex-direction: column;
  animation: drawer-in .18s cubic-bezier(.2,.75,.3,1);
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 17px 20px;
  border-bottom: 1px solid var(--line-default);
  min-height: 68px;
  flex: 0 0 auto;
}

.drawer-head h2 {
  font-size: 15px;
  font-weight: 650;
  margin: 0;
  overflow-wrap: anywhere;
}

.drawer-head .eyebrow {
  font: 9px var(--font-mono);
  color: var(--ink-faint);
  letter-spacing: 1px;
}

.drawer-controls {
  display: flex;
  gap: 3px;
  flex: 0 0 auto;
}

.drawer-body {
  padding: 20px;
  overflow: auto;
  flex: 1;
  min-height: 0;
  overscroll-behavior: contain;
}

.drawer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
  border-top: 1px solid var(--line-default);
  flex: 0 0 auto;
  background: white;
  font-size: 10px;
}

.drawer-handle {
  display: none;
}

.detail-hero {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line-default);
  margin-bottom: 20px;
}

.detail-nft {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 14px;
}

.detail-nft img {
  width: 64px;
  height: 64px;
  border-radius: 7px;
  object-fit: cover;
}

.detail-nft h3 {
  font-size: 17px;
  margin: 0 0 4px;
}

.detail-price {
  font: 600 24px/1.4 var(--font-mono);
  overflow-wrap: anywhere;
}

.detail-price .currency {
  font-size: 13px;
}

.detail-label {
  color: var(--ink-muted);
  font-size: 10.5px;
  margin-bottom: 4px;
}

.detail-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 22px 0 10px;
}

.detail-heading h3 {
  margin: 0;
  font-size: 12px;
  font-weight: 650;
}

.detail-grid {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 12px 16px;
  margin: 14px 0;
  font-size: 12px;
}

.detail-grid dt {
  color: var(--ink-muted);
  font-size: 11px;
}

.detail-grid dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.detail-grid .address-chip {
  width: 100%;
}

.detail-grid .address-label {
  max-width: none;
}

.detail-grid .address-main {
  white-space: normal;
  word-break: break-all;
  font-size: 11px;
}

.detail-grid .entity-actions {
  margin-top: 4px;
}

.detail-grid .entity-actions .icon-btn {
  width: 28px;
  height: 26px;
}

.detail-history {
  display: grid;
  gap: 8px;
}

.history-event {
  padding: 10px 0;
  border-bottom: 1px solid var(--line-default);
}

.history-event-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 5px;
}

.history-event-top .money {
  font-size: 12px;
  max-width: 65%;
}

.history-event-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 10px;
  color: var(--ink-muted);
}

.observations {
  display: grid;
  gap: 8px;
  font-size: 11px;
}

.observation {
  border-left: 2px solid var(--line-default);
  padding: 0 0 4px 12px;
}

.observation .mono {
  font-size: 10px;
  color: var(--ink-muted);
  overflow-wrap: anywhere;
}

.raw-section {
  margin-top: 22px;
  border-top: 1px solid var(--line-default);
  padding-top: 12px;
}

.raw-section summary {
  color: var(--ink-muted);
  font-size: 11px;
  cursor: pointer;
}

.raw-section .btn {
  margin: 10px 0;
}

pre {
  font: 10.5px/1.7 var(--font-mono);
  padding: 12px;
  border-radius: 6px;
  background: var(--bg-subtle);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.notice-line {
  border: 1px solid var(--line-default);
  border-radius: 6px;
  padding: 9px 11px;
  color: var(--ink-muted);
  background: var(--bg-canvas);
  font-size: 10.5px;
  line-height: 1.7;
}

.compact-dialog {
  width: 420px;
  max-width: calc(100vw - 24px);
  max-height: 88dvh;
  padding: 0;
  border: 1px solid var(--line-default);
  border-radius: 10px;
  box-shadow: var(--shadow-pop);
  background: white;
}

.compact-dialog form {
  margin: 0;
}

.compact-dialog .drawer-body {
  padding-top: 8px;
}

.compact-dialog .field {
  margin: 14px 0;
}

.error-text {
  color: var(--err-ink);
  font-size: 11px;
}

.action-sheet {
  width: 360px;
  height: auto;
  max-height: 80dvh;
  inset: auto 12px 12px auto;
  border: 1px solid var(--line-default);
  border-radius: 10px;
}

.action-list {
  display: grid;
  gap: 7px;
}

.action-list .btn {
  justify-content: flex-start;
  height: 42px;
}

.action-address {
  font: 11px/1.7 var(--font-mono);
  overflow-wrap: anywhere;
  margin: 0 0 16px;
}

.toast {
  position: fixed;
  z-index: 100;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  max-width: calc(100vw - 24px);
  border-radius: 7px;
  padding: 10px 15px;
  background: var(--ink-primary);
  color: white;
  box-shadow: var(--shadow-pop);
  font-size: 12px;
  animation: toast-in .15s ease;
}

@keyframes drawer-in {
  from {
    transform: translateX(22px);
    opacity: .5;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translate(-50%, 5px);
  }

  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

@keyframes progress {
  from {
    transform: translateX(-110%);
  }

  to {
    transform: translateX(360%);
  }
}

/* 7. 手机独立行卡和底部筛选，不缩小桌面宽表。 */
@media (max-width: 1190px) {
  .top-links {
    display: none;
  }

  .metrics-inline {
    gap: 10px;
  }

  .metric:last-child {
    display: none;
  }

  .filter-bar .field {
    width: 112px;
  }

  .filter-bar .range-fields .field {
    width: 78px;
  }

  .search-input {
    min-width: 165px;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .metrics-inline .metric:nth-child(4) {
    display: none;
  }

  .auth-chip span:not(.icon) {
    display: none;
  }

  .filter-bar {
    flex-wrap: wrap;
  }

  .search-input {
    flex-basis: 100%;
  }

  .filter-fields {
    flex: 1;
  }

  .filter-fields > .field {
    flex: 1;
  }

  .table-shell {
    max-height: calc(100vh - 265px);
  }

  .data-table td, .data-table th {
    padding-inline: 5px;
  }

  .entity-actions .icon-btn {
    width: 22px;
  }
}

@media (max-width: 767px) {
  .topbar {
    padding: 0 12px;
    gap: 12px;
  }

  .brand {
    font-size: 14px;
    gap: 5px;
  }

  .product-switch {
    gap: 0;
    padding: 2px;
  }

  .product-switch a {
    padding: 4px 7px;
    font-size: 11px;
  }

  .product-switch a:first-child {
    font-size: 0;
  }

  .product-switch a:first-child::after {
    content: "链上";
    font-size: 11px;
  }

  .product-switch a:last-child {
    font-size: 0;
  }

  .product-switch a:last-child::after {
    content: "NFT";
    font-size: 11px;
  }

  .topbar-status {
    gap: 5px;
  }

  .status-chip {
    padding: 5px 6px;
    font-size: 10px;
  }

  #live-text {
    display: none;
  }

  #live {
    width: 25px;
    height: 25px;
    justify-content: center;
    padding: 0;
  }

  #live .status-dot {
    width: 6px;
    height: 6px;
  }

  #auth-text {
    display: none;
  }

  .auth-chip {
    width: 27px;
    height: 27px;
    justify-content: center;
  }

  .subnav {
    height: 38px;
    padding: 0 12px;
    gap: 8px;
  }

  .viewnav {
    gap: 22px;
    overflow-x: auto;
    scrollbar-width: none;
    flex: 1;
  }

  .viewnav button {
    font-size: 12px;
  }

  .metrics-inline {
    display: none;
  }

  .workspace {
    padding: 12px 12px 0;
  }

  .filter-bar {
    gap: 7px;
  }

  .search-input {
    flex: 1;
    min-width: 0;
  }

  input, select {
    height: 40px;
    font-size: 14px;
  }

  .search-input input {
    height: 36px;
    font-size: 12px;
  }

  .desktop-filter-slot, .desktop-apply {
    display: none;
  }

  .mobile-filter-button {
    display: inline-flex;
    height: 36px;
    flex: 0 0 auto;
  }

  .toolbar {
    align-items: flex-start;
    margin-top: 8px;
    min-height: 36px;
  }

  .toolbar-left {
    font-size: 10px;
    gap: 6px;
  }

  .toolbar-actions {
    gap: 2px;
  }

  .refresh-state {
    display: none;
  }

  .sort-label select {
    width: 108px;
    height: 28px;
    font-size: 10px;
  }

  .toolbar-actions > .icon-btn {
    width: 28px;
    height: 28px;
  }

  .toolbar-actions .btn {
    padding: 3px;
    height: 28px;
    width: 28px;
  }

  .csv-label {
    display: none;
  }

  .filter-chips {
    gap: 4px;
  }

  .filter-chip {
    max-width: 150px;
    font-size: 10px;
  }

  .table-shell {
    display: none;
  }

  .mobile-list {
    display: block;
    background: white;
    border: 1px solid var(--line-default);
    border-radius: 8px;
    overflow: hidden;
  }

  .mobile-row {
    position: relative;
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    gap: 4px 9px;
    align-items: center;
    min-height: 88px;
    padding: 10px;
    border-bottom: 1px solid var(--line-subtle);
    cursor: pointer;
  }

  .mobile-row:last-child {
    border-bottom: 0;
  }

  .mobile-row.selected {
    background: var(--brand-soft);
    box-shadow: inset 3px 0 var(--brand);
  }

  .mobile-row .nft-image, .mobile-row .nft-placeholder {
    width: 48px;
    height: 48px;
    grid-row: 1 / span 2;
  }

  .mobile-row .nft-meta {
    align-self: end;
  }

  .mobile-row .nft-name {
    font-size: 12px;
  }

  .mobile-row .mobile-price {
    text-align: right;
    max-width: 120px;
    align-self: end;
  }

  .mobile-row .money {
    font-size: 11px;
  }

  .mobile-row .currency {
    display: block;
    font-size: 10px;
  }

  .mobile-row .mobile-info {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
    color: var(--ink-muted);
    font-size: 9.5px;
    min-width: 0;
  }

  .mobile-row .badge {
    font-size: 9px;
    padding: 2px 4px;
  }

  .mobile-row .mobile-extra {
    text-align: right;
    color: var(--ink-muted);
    font-size: 9px;
  }

  .mobile-row .hash-chip {
    max-width: 110px;
  }

  .mobile-row .hash-chip > a {
    font-size: 9px;
  }

  .mobile-row .hash-chip .icon-btn {
    width: 23px;
    height: 23px;
  }

  .mobile-address-row {
    grid-column: 2 / span 2;
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--ink-muted);
    font-size: 10px;
    overflow: hidden;
  }

  .mobile-address-row .address-chip {
    flex-direction: row;
    align-items: center;
    max-width: 45%;
  }

  .mobile-address-row .entity-actions {
    display: none;
  }

  .mobile-address-row .address-main {
    font-size: 10px;
  }

  .mobile-address-row .address-tail {
    display: none;
  }

  .list-footer {
    flex-wrap: wrap;
    gap: 5px;
    padding-top: 10px;
  }

  .pagination {
    order: -1;
    justify-content: center;
    width: 100%;
    padding-bottom: 8px;
  }

  .pagination .icon-btn {
    width: 34px;
    height: 34px;
  }

  .coverage {
    width: 100%;
  }

  .coverage > summary {
    flex-wrap: wrap;
    gap: 5px;
  }

  .snapshot-banner {
    align-items: flex-start;
    padding: 8px;
    font-size: 10px;
  }

  .snapshot-banner .btn {
    padding-inline: 5px;
    font-size: 10px;
  }

  .drawer, .action-sheet {
    inset: auto 0 0;
    width: 100%;
    max-width: none;
    height: 88dvh;
    max-height: 88dvh;
    margin: 0;
    border: 0;
    border-top: 1px solid var(--line-default);
    border-radius: 14px 14px 0 0;
    box-shadow: 0 -12px 36px rgb(15 23 42 / 15%);
  }

  .drawer[open] {
    animation: sheet-in .18s ease;
  }

  .drawer-handle {
    display: block;
    width: 32px;
    height: 4px;
    border-radius: 4px;
    margin: 8px auto 0;
    background: var(--line-strong);
    flex: 0 0 auto;
  }

  .drawer-head {
    padding: 11px 16px;
    min-height: 55px;
  }

  .drawer-head h2 {
    font-size: 14px;
  }

  .drawer-controls .icon-btn, .drawer-head > .icon-btn {
    width: 32px;
    height: 32px;
  }

  .drawer-body {
    padding: 16px;
  }

  .drawer-footer {
    padding: 11px 16px max(11px, env(safe-area-inset-bottom));
  }

  .drawer-footer .btn {
    height: 38px;
  }

  .drawer-footer > .muted {
    max-width: 65%;
    font-size: 9px;
  }

  .detail-price {
    font-size: 21px;
  }

  .detail-grid {
    grid-template-columns: 80px minmax(0, 1fr);
    gap: 12px;
  }

  .detail-grid .address-label {
    max-width: none;
  }

  .filter-sheet {
    height: auto;
    max-height: 88dvh;
  }

  .filter-sheet .filter-fields {
    display: grid;
    gap: 16px;
    grid-template-columns: 1fr 1fr;
  }

  .filter-sheet .field {
    width: auto;
  }

  .filter-sheet .range-fields {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 12px minmax(0, 1fr);
    gap: 6px;
    grid-column: 1 / -1;
  }

  .filter-sheet .range-dash {
    padding-top: 20px;
    text-align: center;
  }

  .filter-sheet .drawer-body {
    overflow-y: auto;
    padding-bottom: 22px;
  }

  .filter-sheet .drawer-footer {
    justify-content: stretch;
  }

  .filter-sheet .drawer-footer .btn {
    flex: 1;
  }

  .action-sheet {
    height: auto;
  }

  .compact-dialog {
    max-height: 88dvh;
  }

  .compact-dialog input {
    font-size: 16px;
  }

  .toast {
    bottom: 18px;
    font-size: 11px;
  }

  @keyframes sheet-in {
    from {
      transform: translateY(24px);
      opacity: .5;
    }

    to {
      transform: translateY(0);
      opacity: 1;
    }
  }
}

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