:root {
  color-scheme: dark;
  --bg: #101513;
  --card: #1b2220;
  --line: #38433e;
  --text: #eeeede;
  --muted: #aab5ae;
  --accent: #d5e8be;
  --danger: #ffaaa1;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font:
    15px/1.6 ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
}
header {
  max-width: 1380px;
  margin: auto;
  display: flex;
  gap: 24px;
  align-items: center;
  padding: 28px 36px;
  border-bottom: 1px solid var(--line);
}
header > a:last-child {
  margin-left: auto;
  font-size: 13px;
}
.brand {
  font-size: 27px;
  font-weight: 750;
  text-decoration: none;
  letter-spacing: -1px;
}
.brand span {
  font-weight: 400;
  color: var(--muted);
}
a {
  color: inherit;
  text-underline-offset: 4px;
}
.badge {
  border: 1px solid var(--line);
  padding: 5px 10px;
  font-size: 10px;
  letter-spacing: 1.6px;
  color: var(--accent);
}
main {
  max-width: 1320px;
  margin: auto;
  padding: 0 28px;
}
.hero {
  padding: 58px 0 38px;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 1.8px;
  color: var(--accent);
  margin: 0 0 12px;
}
h1 {
  font-size: clamp(40px, 6vw, 70px);
  line-height: 1.04;
  letter-spacing: -3px;
  margin: 12px 0 22px;
  font-weight: 550;
}
h2 {
  font-size: 22px;
  line-height: 1.3;
  letter-spacing: -0.4px;
  margin: 0 0 20px;
}
.lede {
  max-width: 680px;
  font-size: 17px;
  color: var(--muted);
}
.notice {
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  font-size: 13px;
  background: #161f1b;
}
.status {
  display: flex;
  gap: 25px;
  flex-wrap: wrap;
  padding: 20px 0;
  color: var(--muted);
  font-size: 12px;
}
.card {
  border: 1px solid var(--line);
  background: var(--card);
  padding: 25px;
  margin-bottom: 22px;
  min-width: 0;
}
.wallet {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 16px 30px;
}
.wallet > .actions,
.wallet > p {
  grid-column: 1/-1;
}
.mono {
  font:
    12px/1.6 ui-monospace,
    SFMono-Regular,
    monospace;
  overflow-wrap: anywhere;
}
.muted {
  font-size: 12px;
  color: var(--muted);
}
.fee {
  margin: 0;
  padding-left: 10px;
  border-left: 2px solid var(--accent);
  font-size: 12px;
}
.forms {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}
form {
  display: grid;
  gap: 13px;
}
label {
  font-size: 12px;
  display: grid;
  gap: 6px;
  color: var(--muted);
}
input,
select,
textarea {
  width: 100%;
  background: #111815;
  border: 1px solid var(--line);
  padding: 11px 12px;
  color: var(--text);
  font: inherit;
  border-radius: 3px;
  min-width: 0;
}
input:focus,
select:focus,
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
input[type='checkbox'] {
  width: auto;
}
button {
  border: 1px solid transparent;
  background: var(--accent);
  color: #162012;
  padding: 11px 16px;
  font: 600 12px/1.4 inherit;
  cursor: pointer;
  border-radius: 3px;
}
button.secondary,
.file-button {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
}
button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.file-button {
  padding: 10px 14px;
  cursor: pointer;
}
.file-button input {
  max-width: 190px;
  font-size: 11px;
  padding: 3px;
}
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.table-wrap {
  overflow-x: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  min-width: 530px;
}
th,
td {
  padding: 15px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 13px;
}
th {
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
}
.asset-id {
  display: block;
  max-width: 410px;
  font:
    10px/1.5 ui-monospace,
    monospace;
  overflow-wrap: anywhere;
  color: var(--muted);
  margin-top: 4px;
}
hr {
  border: 0;
  border-top: 1px solid var(--line);
  width: 100%;
  margin: 28px 0;
}
.offer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 15px;
}
.offer {
  padding: 18px;
  border: 1px solid var(--line);
  min-width: 0;
}
.offer p {
  margin: 7px 0;
}
.offer .mono {
  font-size: 10px;
}
.offer h3 {
  font-size: 18px;
  margin: 0 0 12px;
}
.tx {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
}
.tx .mono {
  font-size: 10px;
}
#message {
  min-height: 30px;
  color: var(--accent);
}
#message.error {
  color: var(--danger);
}
footer {
  font-size: 12px;
  color: var(--muted);
  padding: 25px 0 40px;
}
dialog {
  width: min(95vw, 660px);
  max-height: 90vh;
  overflow-y: auto;
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--accent);
  padding: 26px;
}
dialog::backdrop {
  background: #000b;
}
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font:
    12px/1.7 ui-monospace,
    monospace;
}
[hidden] {
  display: none !important;
}
@media (max-width: 850px) {
  .forms {
    grid-template-columns: 1fr;
  }
  .wallet {
    grid-template-columns: 1fr;
  }
  .hero {
    padding-top: 35px;
  }
  header {
    padding: 20px;
    gap: 15px;
    flex-wrap: wrap;
  }
  header > a:last-child {
    margin-left: 0;
  }
  .badge {
    font-size: 9px;
  }
  main {
    padding: 0 16px;
  }
  .card {
    padding: 20px;
  }
  .section-head {
    align-items: flex-start;
  }
  h1 {
    letter-spacing: -2px;
  }
}

/* ------------------------------------------------------------------ tabs */
:root {
  --warn: #f1d58a;
  --ok: #b9e6a0;
  --soft: #141b18;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}
.tabs {
  position: relative;
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  margin: 0 0 22px;
  border: 1px solid var(--line);
  background: var(--soft);
  border-radius: 6px;
}
.tab {
  background: transparent;
  color: var(--muted);
  border: 0;
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 4px;
  transition:
    background 0.2s var(--ease),
    color 0.2s var(--ease);
}
.tab:hover {
  color: var(--text);
}
.tab[aria-selected='true'] {
  background: var(--accent);
  color: #162012;
}
.split {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(300px, 1fr);
  gap: 22px;
  align-items: start;
}
.side {
  display: grid;
  gap: 0;
}
.bar {
  display: block;
  height: 6px;
  border-radius: 6px;
  background: #0e1311;
  overflow: hidden;
}
.bar .fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #8fb77b, var(--accent));
  transition: width 0.9s var(--ease);
}
.empty {
  color: var(--muted);
  font-size: 13px;
  padding: 26px 12px;
  margin: 0;
}
.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 16px;
}
.action-status {
  min-height: 42px;
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  display: block;
}
.action-status.ok {
  color: var(--ok);
}
.action-status.bad {
  color: var(--danger);
}
@keyframes blink {
  50% {
    opacity: 0.25;
  }
}
button.link {
  background: none;
  border: 0;
  padding: 0;
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.back {
  margin: 0 0 16px;
  font-size: 13px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 999px;
  text-decoration: none;
  transition:
    background 0.15s var(--ease),
    border-color 0.15s var(--ease),
    color 0.15s var(--ease);
}
button.chip:hover:not(:disabled) {
  border-color: var(--accent);
}
.chip.on {
  background: var(--accent);
  border-color: var(--accent);
  color: #162012;
}
.chip.ok {
  color: var(--ok);
  border-color: #b9e6a055;
}
.chip.locked {
  color: var(--warn);
  border-color: #f1d58a55;
}
.chip.locked::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--warn);
  animation: blink 1.2s ease-in-out infinite;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 1fr);
  gap: 22px;
  align-items: start;
}
.label-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  min-height: 20px;
}
@media (max-width: 1050px) {
  .split,
  .detail-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 640px) {
  .tabs {
    display: flex;
  }
  .tab {
    flex: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ------------------------------------------------------------------ unique symbols */
/* One reserved line: availability appears without shifting the form. */
.symbol-status {
  margin: -6px 0 0;
  min-height: 18px;
  font-size: 12px;
  line-height: 18px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.symbol-status[data-state='available'] {
  color: var(--ok);
}
.symbol-status[data-state='taken'] {
  color: var(--danger);
}
.symbol-status a {
  color: inherit;
  font-size: 11px;
}

/* ------------------------------------------------------------------ qlyphs */
.q-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  min-height: 160px;
}
.q-grid > .empty {
  grid-column: 1/-1;
}
.q-tile {
  display: grid;
  gap: 0;
  padding: 0;
  text-align: left;
  background: var(--soft);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  font-weight: 400;
  transition:
    border-color 0.15s var(--ease),
    transform 0.15s var(--ease);
}
.q-tile:hover {
  border-color: var(--accent);
}
.q-tile:active {
  transform: scale(0.98);
}
.q-thumb {
  aspect-ratio: 1;
  display: grid;
  background: #0c100e;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.q-meta {
  display: grid;
  gap: 1px;
  padding: 9px 10px 10px;
  min-width: 0;
}
.q-meta span {
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.q-num {
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}
.qlyph-render {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}
.qlyph-render img {
  max-width: 100%;
  max-height: 100%;
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
}
.qlyph-render pre {
  margin: 0;
  width: 100%;
  height: 100%;
  padding: 14px;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font:
    12px/1.55 ui-monospace,
    SFMono-Regular,
    monospace;
  color: var(--text);
  place-self: stretch;
}
.qlyph-render.compact pre {
  font-size: 10px;
  padding: 10px;
  overflow: hidden;
}
.qlyph-render.binary {
  gap: 4px;
  align-content: center;
  padding: 12px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}
.qlyph-render.binary code {
  font-size: 10px;
  overflow-wrap: anywhere;
}
.qlyph-render.placeholder {
  color: var(--muted);
}
.q-preview {
  display: grid;
  min-height: 160px;
  max-height: 300px;
  border: 1px dashed var(--line);
  border-radius: 4px;
  background: #0c100e;
  overflow: hidden;
}
.q-preview .empty {
  place-self: center;
  text-align: center;
}
.q-preview .qlyph-render img {
  max-height: 280px;
}
dialog .q-preview {
  margin-bottom: 12px;
  max-height: 240px;
}
.q-meter #q-bytes {
  font-variant-numeric: tabular-nums;
}
.q-meter .bad,
.bar .fill.bad {
  color: var(--danger);
}
.bar .fill.bad {
  background: var(--danger);
}
.q-stage {
  display: grid;
  aspect-ratio: 1;
  max-height: 640px;
  background: #0c100e;
  border: 1px solid var(--line);
}
.q-stage .qlyph-render pre {
  font-size: 14px;
  padding: 22px;
}
.q-number {
  font-size: 34px;
  letter-spacing: -1px;
  margin: 4px 0 18px;
  font-variant-numeric: tabular-nums;
}
.q-facts {
  display: grid;
  margin: 0;
  border-top: 1px solid var(--line);
}
.q-facts > div {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}
.q-facts dt {
  font-size: 12px;
  color: var(--muted);
}
.q-facts dd {
  margin: 0;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.q-facts dd .chip {
  margin-left: 8px;
  padding: 2px 8px;
  font-size: 10px;
}
.q-facts a {
  color: var(--text);
}
@media (max-width: 640px) {
  .q-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .q-facts > div {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}
