:root {
  color-scheme: dark;
  --page: #0d100f;
  --surface: #151917;
  --surface-alt: #111412;
  --surface-raised: #1b201d;
  --line: #303732;
  --line-strong: #465048;
  --text: #f3f6f4;
  --muted: #9aa49d;
  --accent: #52d68c;
  --accent-ink: #07150d;
  --warning: #efba55;
  --danger: #ef747b;
}

* { box-sizing: border-box; }

html { min-width: 320px; }

body {
  margin: 0;
  min-height: 100vh;
  border-top: 3px solid var(--accent);
  color: var(--text);
  background: var(--page);
  font: 15px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

button {
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 0 18px;
  color: var(--accent-ink);
  background: var(--accent);
  font-weight: 750;
  letter-spacing: 0;
  cursor: pointer;
}

button:hover { filter: brightness(1.06); }
button:focus-visible, a:focus-visible, input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
button:disabled { opacity: .48; cursor: not-allowed; filter: none; }

.hidden { display: none !important; }

.app-header {
  width: min(1180px, calc(100% - 40px));
  min-height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand, .session-tools, .brand-copy, .status-badge {
  display: flex;
  align-items: center;
}

.brand { gap: 11px; }
.brand-copy { align-items: flex-start; flex-direction: column; line-height: 1.2; }
.brand-copy strong { font-size: 15px; }
.brand-copy > span { margin-top: 3px; color: var(--muted); font-size: 11px; }

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  padding: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
}
.brand-mark span { background: var(--accent); }
.brand-mark span:nth-child(2), .brand-mark span:nth-child(3) { opacity: .35; }

.session-tools { gap: 9px; }
.status-badge {
  min-height: 34px;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 11px;
  color: var(--muted);
  background: var(--surface-alt);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
}
.status-badge[data-state="waiting"],
.status-badge[data-state="warming"],
.status-badge[data-state="generating"],
.status-badge[data-state="offered"],
.status-badge[data-state="claimed"],
.status-badge[data-state="reviewing"] { color: var(--text); }
.status-badge[data-state="waiting"] .status-dot,
.status-badge[data-state="warming"] .status-dot,
.status-badge[data-state="generating"] .status-dot,
.status-badge[data-state="offered"] .status-dot,
.status-badge[data-state="claimed"] .status-dot,
.status-badge[data-state="reviewing"] .status-dot { background: var(--accent); }
.status-badge[data-state="manual_review"] .status-dot { background: var(--warning); }
.status-badge[data-state="failed"] .status-dot { background: var(--danger); }

.quiet-button {
  min-height: 36px;
  border-color: var(--line);
  padding: 0 12px;
  color: var(--text);
  background: var(--surface-raised);
  font-size: 12px;
}

.page-grid {
  width: min(1180px, calc(100% - 40px));
  margin: 18px auto 48px;
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, .75fr);
  gap: 14px;
  align-items: stretch;
}

.task-surface, .account-rail {
  min-width: 0;
  min-height: 650px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.task-surface { position: relative; background: var(--surface); }
.account-rail { background: var(--surface-alt); }

.entry-view {
  min-height: 648px;
  padding: 76px clamp(28px, 6vw, 74px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.section-label {
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.entry-copy h1, .activity-copy h1 {
  max-width: 620px;
  margin: 10px 0 0;
  font-size: 34px;
  line-height: 1.15;
  letter-spacing: 0;
}

#startForm { max-width: 620px; margin-top: 48px; }
.field-heading {
  margin-bottom: 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.field-heading label { color: var(--text); font-size: 13px; font-weight: 700; }
.field-heading span { color: var(--muted); font-size: 11px; white-space: nowrap; }

input {
  width: 100%;
  height: 56px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 0 15px;
  color: var(--text);
  background: #0f1210;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 14px;
  letter-spacing: 0;
}
input::placeholder { color: #69736c; }

#startButton {
  width: 100%;
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.live-workspace { min-height: 648px; padding: 34px clamp(24px, 4vw, 48px) 42px; }
.live-header, .rail-heading, .order-action-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.sync-label, .rail-heading > span:last-child { color: var(--muted); font-size: 11px; }

.activity-block {
  min-height: 230px;
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  align-items: center;
  gap: 28px;
  border-bottom: 1px solid var(--line);
}
.activity-copy p { max-width: 570px; margin: 12px 0 0; color: var(--muted); }

.activity-signal {
  width: 82px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-left: 1px solid var(--line-strong);
  border-right: 1px solid var(--line-strong);
}
.activity-signal span {
  width: 5px;
  height: 18px;
  background: var(--muted);
  animation: signal 1.25s ease-in-out infinite;
}
.activity-signal span:nth-child(2), .activity-signal span:nth-child(4) { animation-delay: .14s; }
.activity-signal span:nth-child(3) { animation-delay: .28s; }
.activity-signal[data-state="offline"] span,
.activity-signal[data-state="failed"] span { animation: none; height: 6px; }
.activity-signal:not([data-state="offline"]):not([data-state="failed"]) span { background: var(--accent); }

@keyframes signal {
  0%, 100% { height: 12px; opacity: .5; }
  50% { height: 44px; opacity: 1; }
}

.order-action { padding-top: 30px; }
.order-action h2 { margin: 5px 0 0; font-size: 19px; letter-spacing: 0; }
.countdown {
  min-width: 70px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 7px 9px;
  text-align: center;
  color: var(--warning);
  background: #111410;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-weight: 800;
}
.order-amount {
  display: block;
  margin: 28px 0;
  font-size: 32px;
  line-height: 1.15;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}
.order-action > button, .primary-link {
  width: 100%;
  min-height: 48px;
}
.primary-link {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  color: var(--accent-ink);
  background: var(--accent);
  font-weight: 750;
  text-decoration: none;
}
.payment-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 22px;
}
.payment-details { min-width: 0; }
.payment-link-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}
.payment-link-row .quiet-button { min-height: 48px; }
.order-reference {
  margin: -16px 0 22px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 11px;
}
.order-reference code {
  color: var(--text);
  font-size: 11px;
  overflow-wrap: anywhere;
}
.qr-panel {
  width: 148px;
  aspect-ratio: 1;
  margin: 0;
  border: 8px solid #fff;
  border-radius: 6px;
  background: #fff;
}
.qr-panel img { width: 100%; height: 100%; display: block; object-fit: contain; }
.payment-actions { margin-top: 10px; display: grid; grid-template-columns: 1.2fr .8fr; gap: 10px; }
.payment-actions button { min-height: 48px; }
.danger-button { color: var(--danger); border-color: #6d3539; background: #251719; }

.error-banner {
  position: absolute;
  right: 24px;
  bottom: 24px;
  left: 24px;
  border: 1px solid #71383d;
  border-radius: 6px;
  padding: 12px 14px;
  color: #ffb9bd;
  background: #251719;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.progress-section, .account-section, .network-section, .account-activity-section { padding: 28px; }
.account-section, .network-section, .account-activity-section { border-top: 1px solid var(--line); }

.progress-list { margin: 24px 0 0; padding: 0; list-style: none; }
.progress-list li {
  position: relative;
  min-height: 74px;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 13px;
  color: var(--muted);
}
.progress-list li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 34px;
  bottom: 0;
  left: 17px;
  width: 1px;
  background: var(--line-strong);
}
.step-index {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface-alt);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11px;
  font-weight: 700;
  z-index: 1;
}
.progress-list strong, .progress-list small { display: block; }
.progress-list strong { padding-top: 1px; color: inherit; font-size: 13px; }
.progress-list small { margin-top: 2px; color: var(--muted); font-size: 11px; }
.progress-list li.active { color: var(--text); }
.progress-list li.active .step-index { border-color: var(--accent); color: var(--accent-ink); background: var(--accent); }
.progress-list li.complete { color: var(--accent); }
.progress-list li.complete .step-index { border-color: #317950; color: var(--accent); background: #14251b; }
.progress-list li.complete::after { background: #317950; }

.wallet-summary { margin-top: 20px; }
.wallet-summary > span { display: block; color: var(--muted); font-size: 11px; }
.wallet-summary code {
  display: block;
  margin-top: 6px;
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.balance-grid {
  margin-top: 22px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.balance-grid > div {
  min-width: 0;
  padding: 14px 12px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.balance-grid span, .balance-grid strong { display: block; }
.balance-grid span { color: var(--muted); font-size: 10px; text-transform: uppercase; }
.balance-grid strong { margin-top: 7px; font-size: 13px; overflow-wrap: anywhere; }

.network-section { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.network-section span, .network-section strong { display: block; }
.network-section span { color: var(--muted); font-size: 10px; text-transform: uppercase; }
.network-section strong { margin-top: 5px; font-size: 12px; }

.segmented-control {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 3px;
  background: #0f1210;
}
.segmented-control button {
  min-height: 32px;
  border: 0;
  padding: 0 10px;
  color: var(--muted);
  background: transparent;
  font-size: 11px;
}
.segmented-control button.active {
  color: var(--text);
  background: var(--surface-raised);
}
.activity-tabs { margin-top: 18px; }
.activity-list { margin-top: 12px; }
.activity-item {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.activity-item:last-child { border-bottom: 0; }
.activity-item-copy { min-width: 0; }
.activity-item-copy strong, .activity-item-copy span { display: block; }
.activity-item-copy strong { font-size: 12px; overflow-wrap: anywhere; }
.activity-item-copy span {
  margin-top: 3px;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 10px;
  overflow-wrap: anywhere;
}
.activity-empty { margin: 22px 0 4px; color: var(--muted); font-size: 12px; }
.mini-status {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 7px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}
.mini-status[data-tone="good"] { border-color: #2e6c49; color: var(--accent); background: #14251b; }
.mini-status[data-tone="warn"] { border-color: #725b30; color: var(--warning); background: #292317; }
.mini-status[data-tone="bad"] { border-color: #6d3539; color: var(--danger); background: #251719; }

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 30;
  max-width: min(360px, calc(100% - 32px));
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 11px 14px;
  color: var(--text);
  background: #202521;
  box-shadow: 0 14px 36px rgba(0, 0, 0, .32);
  font-size: 12px;
}

@media (max-width: 900px) {
  .page-grid { grid-template-columns: 1fr; }
  .task-surface, .account-rail { min-height: 0; }
  .account-rail { display: grid; grid-template-columns: 1fr 1fr; }
  .progress-section { grid-row: span 2; }
  .account-section { border-top: 0; border-left: 1px solid var(--line); }
  .network-section { border-left: 1px solid var(--line); }
  .account-activity-section { grid-column: 1 / -1; }
}

@media (max-width: 620px) {
  .app-header, .page-grid { width: min(100% - 20px, 1180px); }
  .app-header { min-height: 68px; align-items: flex-start; padding: 10px 0; }
  .brand-copy > span { display: none; }
  .session-tools { max-width: 214px; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
  .status-badge { padding: 5px 9px; }
  .quiet-button { padding: 0 10px; }
  .page-grid { margin-top: 10px; margin-bottom: 24px; gap: 10px; }
  .entry-view { min-height: 500px; padding: 44px 22px; justify-content: flex-start; }
  .entry-copy h1, .activity-copy h1 { font-size: 28px; }
  #startForm { margin-top: 42px; }
  .field-heading { align-items: flex-start; flex-direction: column; gap: 2px; }
  .live-workspace { min-height: 540px; padding: 24px 20px 32px; }
  .activity-block { min-height: 215px; grid-template-columns: 58px minmax(0, 1fr); gap: 17px; }
  .activity-signal { width: 58px; gap: 4px; }
  .activity-signal span { width: 4px; }
  .order-action-header { align-items: flex-start; }
  .order-amount { font-size: 27px; }
  .payment-layout { grid-template-columns: 1fr; }
  .qr-panel { width: min(180px, 100%); }
  .payment-link-row { grid-template-columns: 1fr; }
  .payment-actions { grid-template-columns: 1fr; }
  .account-rail { display: block; }
  .progress-section, .account-section, .network-section, .account-activity-section { padding: 24px 20px; }
  .account-section, .network-section { border-left: 0; border-top: 1px solid var(--line); }
  .error-banner { right: 14px; bottom: 14px; left: 14px; }
  .toast { right: 10px; bottom: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .activity-signal span { animation: none; }
}

/* Publisher workspace */
.publisher-page {
  min-height: 100vh;
  background: #0b0e0c;
}

.publisher-page button,
.publisher-page input,
.publisher-page textarea { font: inherit; }

.publisher-page input,
.publisher-page textarea {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.publisher-header,
.publisher-shell {
  width: min(1320px, calc(100% - 40px));
}

.workspace-link {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 12px;
  color: var(--text);
  background: var(--surface-raised);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.publisher-shell { margin: 28px auto 64px; }
.publisher-title-row,
.publisher-section-heading,
.request-toolbar,
.request-title-line,
.task-table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.publisher-title-row { margin-bottom: 20px; }
.publisher-title-row h1 {
  margin: 6px 0 0;
  font-size: 27px;
  line-height: 1.2;
  letter-spacing: 0;
}

.publisher-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, .65fr);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
}

.publisher-compose,
.publisher-request-summary { min-width: 0; padding: 30px; }
.publisher-request-summary {
  border-left: 1px solid var(--line);
  background: var(--surface-alt);
}
.publisher-section-heading { align-items: flex-start; }
.publisher-section-heading h2 {
  margin: 6px 0 0;
  font-size: 18px;
  line-height: 1.3;
  letter-spacing: 0;
}
.input-count {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.publisher-compose form { margin-top: 28px; }
.publisher-field { margin-top: 20px; }
.publisher-field:first-child { margin-top: 0; }
.publisher-field .field-heading { min-height: 26px; }
.publisher-key-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}
.publisher-key-row .quiet-button { min-height: 56px; min-width: 66px; }
.session-option {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
  cursor: pointer;
}
.session-option input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--accent);
}
.text-button {
  min-height: 26px;
  border: 0;
  border-radius: 0;
  padding: 0;
  color: var(--muted);
  background: transparent;
  font-size: 11px;
  font-weight: 700;
}
.text-button:hover { color: var(--text); filter: none; }
.publisher-compose textarea {
  width: 100%;
  min-height: 246px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 14px 15px;
  resize: vertical;
  color: var(--text);
  background: #0f1210;
  font-size: 12px;
  line-height: 1.65;
  letter-spacing: 0;
}
.publisher-compose textarea::placeholder { color: #69736c; }
.publisher-compose textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.publish-submit {
  width: 100%;
  min-height: 50px;
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.publish-submit span:last-child {
  min-width: 28px;
  border-left: 1px solid rgba(7, 21, 13, .28);
  padding-left: 12px;
  text-align: right;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}
.inline-notice {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 11px 13px;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.error-notice { border-color: #71383d; color: #ffb9bd; background: #251719; }

.request-facts { margin: 28px 0 0; }
.request-facts > div {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
.request-facts dt { color: var(--muted); font-size: 11px; }
.request-facts dd {
  min-width: 0;
  margin: 0;
  text-align: right;
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11px;
  overflow-wrap: anywhere;
}
.request-empty-state {
  min-height: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}
.empty-state-mark {
  width: 48px;
  height: 48px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  border: 1px solid var(--line-strong);
  padding: 11px;
}
.empty-state-mark::before,
.empty-state-mark::after {
  content: "";
  border: 1px solid var(--line-strong);
}

.request-workspace { margin-top: 34px; }
.request-toolbar { align-items: flex-end; }
.request-title-line { margin-top: 5px; justify-content: flex-start; flex-wrap: wrap; }
.request-title-line h2 { margin: 0; font-size: 20px; letter-spacing: 0; }
.request-title-line code {
  color: var(--muted);
  font-size: 11px;
  overflow-wrap: anywhere;
}
.request-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.warning-button { border-color: #725b30; color: var(--warning); background: #292317; }

.request-metrics {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}
.request-metrics > div {
  min-width: 0;
  min-height: 86px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 14px;
  background: var(--surface);
}
.request-metrics span,
.request-metrics strong { display: block; }
.request-metrics span { color: var(--muted); font-size: 10px; text-transform: uppercase; }
.request-metrics strong {
  margin-top: 8px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 24px;
  line-height: 1;
}

.task-table-toolbar { margin: 22px 0 10px; }
.task-filters { width: min(430px, 100%); }
.publisher-table-wrap {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: auto;
  background: var(--surface-alt);
}
.publisher-task-table {
  width: 100%;
  min-width: 1080px;
  border-collapse: collapse;
  table-layout: fixed;
}
.publisher-task-table th,
.publisher-task-table td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.publisher-task-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: var(--muted);
  background: #111412;
  font-size: 10px;
  font-weight: 750;
  text-transform: uppercase;
}
.publisher-task-table th:nth-child(1) { width: 145px; }
.publisher-task-table th:nth-child(2) { width: 145px; }
.publisher-task-table th:nth-child(3),
.publisher-task-table th:nth-child(4) { width: 190px; }
.publisher-task-table th:nth-child(5) { width: 70px; }
.publisher-task-table th:nth-child(6) { width: 250px; }
.publisher-task-table th:nth-child(7) { width: 130px; }
.publisher-task-table td { color: var(--text); font-size: 11px; overflow-wrap: anywhere; }
.publisher-task-table tbody tr:last-child td { border-bottom: 0; }
.publisher-task-table tbody tr:hover td { background: rgba(255, 255, 255, .018); }
.cell-subtext {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}
.task-error-detail { max-width: 240px; }
.task-status {
  display: inline-flex;
  min-height: 25px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 8px;
  color: var(--muted);
  background: var(--surface-raised);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}
.task-status[data-tone="good"] { border-color: #2e6c49; color: var(--accent); background: #14251b; }
.task-status[data-tone="warn"] { border-color: #725b30; color: var(--warning); background: #292317; }
.task-status[data-tone="bad"] { border-color: #6d3539; color: var(--danger); background: #251719; }
.copy-value { min-width: 0; display: flex; align-items: flex-start; gap: 6px; }
.copy-value code { min-width: 0; color: var(--text); font-size: 10px; overflow-wrap: anywhere; }
.table-copy-button {
  flex: 0 0 auto;
  min-height: 24px;
  border-color: var(--line);
  padding: 0 7px;
  color: var(--muted);
  background: transparent;
  font-size: 9px;
}
.table-empty { padding: 42px 20px; text-align: center; color: var(--muted); font-size: 12px; }

@media (max-width: 1050px) {
  .request-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .publisher-workbench { grid-template-columns: 1fr; }
  .publisher-request-summary { border-top: 1px solid var(--line); border-left: 0; }
  .request-empty-state { min-height: 110px; }
}

@media (max-width: 720px) {
  .publisher-header,
  .publisher-shell { width: min(100% - 20px, 1320px); }
  .publisher-shell { margin-top: 14px; margin-bottom: 32px; }
  .publisher-title-row { align-items: flex-end; }
  .publisher-title-row h1 { font-size: 23px; }
  .publisher-compose,
  .publisher-request-summary { padding: 22px 18px; }
  .publisher-field .field-heading { align-items: center; flex-direction: row; }
  .publisher-key-row { grid-template-columns: 1fr; }
  .publisher-key-row .quiet-button { min-height: 40px; }
  .request-toolbar { align-items: flex-start; flex-direction: column; }
  .request-actions { width: 100%; justify-content: flex-start; }
  .request-actions .quiet-button { flex: 1 1 auto; }
  .request-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .task-table-toolbar { align-items: flex-start; flex-direction: column; }
  .task-filters { width: 100%; }
  .publisher-table-wrap { border: 0; overflow: visible; background: transparent; }
  .publisher-task-table,
  .publisher-task-table tbody,
  .publisher-task-table tr,
  .publisher-task-table td { display: block; width: 100%; min-width: 0; }
  .publisher-task-table thead { display: none; }
  .publisher-task-table tr {
    margin-bottom: 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 5px 14px;
    background: var(--surface);
  }
  .publisher-task-table td {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 10px;
    border-bottom: 1px solid var(--line);
    padding: 11px 0;
  }
  .publisher-task-table td:last-child { border-bottom: 0; }
  .publisher-task-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 10px;
    text-transform: uppercase;
  }
  .publisher-task-table tbody tr:hover td { background: transparent; }
}

@media (max-width: 420px) {
  .publisher-title-row > .sync-label { display: none; }
  .request-metrics { gap: 6px; }
  .request-metrics > div { min-height: 76px; padding: 12px; }
  .request-metrics strong { font-size: 21px; }
  .task-filters button { padding: 0 6px; }
  .publisher-task-table td { grid-template-columns: 78px minmax(0, 1fr); }
}

/* Diamond wallet bar */
.diamond-wallet-bar {
  margin-bottom: 24px;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-raised);
}
.diamond-wallet-info {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.diamond-balance .label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
}
.diamond-balance strong {
  font-size: 20px;
  color: var(--accent);
}
.diamond-cdk-redeem {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 200px;
}
.diamond-cdk-redeem input {
  flex: 1;
  min-width: 0;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-family: monospace;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.diamond-cdk-redeem button {
  padding: 8px 16px;
  border: none;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  cursor: pointer;
}
.diamond-cdk-redeem button:disabled { opacity: .5; }
.cdk-status {
  width: 100%;
  min-height: 1.2em;
  margin-top: 4px;
  font-size: 12px;
}
.cdk-status.success { color: var(--accent); }
.cdk-status.error { color: var(--danger); }

/* Task Hall (接单大厅) */
.workspace-tabs {
  display: flex;
  gap: 4px;
}
.workspace-tab {
  min-height: 32px;
  padding: 4px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.workspace-tab.active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(82, 214, 140, .08);
}
.ws-panel.hidden { display: none; }
.hall-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.hall-header h2 { margin: 4px 0 0; font-size: 18px; }
.hall-hint { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.hall-list { display: grid; gap: 10px; }
.hall-empty {
  padding: 32px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}
.hall-card {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-raised);
}
.hall-card:hover { border-color: var(--line-strong); }
.hall-card-info { min-width: 0; }
.hall-card-amount {
  display: block;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}
.hall-card-meta {
  display: flex;
  gap: 12px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}
.hall-card button {
  min-height: 38px;
  padding: 0 16px;
  font-size: 13px;
}
.hall-card button:disabled {
  opacity: .5;
  cursor: not-allowed;
}

/* Scanner multi-task claims */
.workspace-status-line,
.active-order-heading,
.active-order-row-header,
.active-order-state-box,
.active-order-actions {
  display: flex;
  align-items: center;
}
.workspace-status-line { gap: 10px; }
.claim-capacity {
  min-width: 58px;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 8px;
  color: var(--accent);
  background: var(--surface-raised);
  font: 700 11px/1 ui-monospace, SFMono-Regular, Consolas, monospace;
}
.claim-capacity[data-full="true"] { color: var(--warning); }
.active-order-region { padding: 28px 0; border-bottom: 1px solid var(--line); }
.active-order-heading { justify-content: space-between; gap: 14px; }
.active-order-heading h2 { margin: 5px 0 0; font-size: 18px; letter-spacing: 0; }
.active-order-list {
  max-height: 480px;
  margin-top: 14px;
  display: grid;
  gap: 9px;
  overflow: auto;
}
.active-order-empty {
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-size: 12px;
}
.active-order-row {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 14px;
  background: var(--surface-raised);
}
.active-order-row[data-state="reviewing"],
.active-order-row[data-state="manual_review"] { border-color: #66542e; }
.active-order-row-header { justify-content: space-between; gap: 12px; }
.active-order-row-header > div { min-width: 0; }
.active-order-provider,
.active-order-number { display: block; overflow-wrap: anywhere; }
.active-order-provider { font-size: 13px; }
.active-order-number { margin-top: 4px; color: var(--muted); font-size: 10px; }
.active-order-state-box { flex: 0 0 auto; gap: 8px; }
.active-order-countdown {
  min-width: 58px;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 4px 7px;
  color: var(--text);
  font: 700 11px/1.2 ui-monospace, SFMono-Regular, Consolas, monospace;
  text-align: center;
}
.active-order-actions {
  margin-top: 13px;
  display: grid;
  grid-template-columns: minmax(125px, 1fr) auto auto;
  gap: 8px;
}
.active-order-actions > * { min-width: 0; min-height: 40px; }
.compact-link { padding: 0 13px; font-size: 12px; }
.active-order-actions button { padding: 0 13px; font-size: 12px; }
.active-order-review-note { margin: 11px 0 0; color: var(--muted); font-size: 11px; }
.hall-list { max-height: 530px; overflow: auto; }
.hall-card-amount { font-size: 14px; }
.hall-card-meta span:first-child { overflow-wrap: anywhere; }

@media (max-width: 720px) {
  .workspace-status-line .sync-label { display: none; }
  .active-order-actions { grid-template-columns: 1fr 1fr; }
  .active-order-actions .compact-link { grid-column: 1 / -1; }
  .hall-card-meta { flex-direction: column; gap: 2px; }
}

@media (max-width: 420px) {
  .active-order-row-header { align-items: flex-start; flex-direction: column; }
  .active-order-state-box { width: 100%; justify-content: space-between; }
  .active-order-actions { grid-template-columns: 1fr; }
  .active-order-actions .compact-link { grid-column: auto; }
  .hall-card { grid-template-columns: 1fr; }
  .hall-card button { width: 100%; }
}
