html:not([data-theme]),
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0c0f14;
  --surface: #151b24;
  --surface-2: #1c2633;
  --text: #e9eef5;
  --muted: #93a0b5;
  --line: #243041;
  --accent: #8dffc1;
  --accent-ink: #042;
  --danger: #ff8f8f;
  --warn: #ffd38a;
  --offer: #ffd38a;
  --offer-ink: #1a1204;
  --offer-text: #ffd38a;
  --focus: #8dffc1;
  --ghost: #8dffc1;
  --ghost-border: #245c40;
  --nav: #10151c;
}
html[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-2: #e6edf3;
  --text: #14181f;
  --muted: #4e5d6e;
  --line: #d5dee7;
  --accent: #0e7a45;
  --accent-ink: #ffffff;
  --danger: #a32020;
  --warn: #8a5a00;
  --offer: #f4d7a1;
  --offer-ink: #3a2600;
  --offer-text: #8a5a00;
  --focus: #0e7a45;
  --ghost: #0e7a45;
  --ghost-border: #8fbfa6;
  --nav: #ffffff;
}
body { margin: 0; background: var(--bg); color: var(--text); font: 400 1rem/1.45 system-ui, -apple-system, "Segoe UI", sans-serif; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
main { max-width: 32rem; margin: auto; padding: 1.1rem 1rem 2rem; }
h1 { margin: 0; font-size: 1.35rem; font-weight: 650; line-height: 1.2; letter-spacing: -0.02em; }
h2 { margin: 0 0 0.6rem; color: var(--text); font-size: 0.95rem; font-weight: 650; line-height: 1.3; }
button, a.b {
  display: block;
  box-sizing: border-box;
  width: 100%;
  margin: .6rem 0;
  padding: .85rem;
  border: 0;
  border-radius: .7rem;
  background: var(--accent);
  color: var(--accent-ink);
  font: inherit;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}
.g, a.b.g { background: transparent; color: var(--ghost); border: 1px solid var(--ghost-border); }
input, select {
  display: block;
  box-sizing: border-box;
  width: 100%;
  margin: .3rem 0;
  padding: .7rem;
  border-radius: .6rem;
  border: 1px solid var(--line);
  background: var(--surface);
  color: inherit;
  font: inherit;
}
.m { color: var(--muted); font-size: 0.8125rem; font-weight: 400; line-height: 1.4; }
code, .mono, .tx-hash, pre.json { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
code { word-break: break-all; }
pre.json {
  box-sizing: border-box;
  max-width: 100%;
  margin: .8rem 0;
  padding: .8rem;
  overflow: auto;
  max-height: 40vh;
  border-radius: .7rem;
  background: var(--surface);
  border: 1px solid var(--line);
  font: 12px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
pre.json:empty { display: none; }
.note { margin: .6rem 0; color: var(--warn); }
.note:empty { display: none; }
p a, li a, .note a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.12rem;
  text-decoration-color: var(--line);
}
details.raw {
  margin: .8rem 0;
  border: 1px solid var(--line);
  border-radius: .8rem;
  background: var(--surface);
}
details.raw[hidden] { display: none; }
details.raw summary { padding: .8rem .9rem; cursor: pointer; font-weight: 700; }
details.raw pre.json { margin: 0; border: 0; border-radius: 0; border-top: 1px solid var(--line); }
.balance { margin: .2rem 0 .35rem; font-size: 2.5rem; font-weight: 650; line-height: 1.05; letter-spacing: -0.03em; }
.balance span { font-size: 1rem; font-weight: 650; color: var(--muted); }
.lines { margin: 0 0 .45rem; }
.lines:empty { display: none; }
.lines .m { margin: .12rem 0; }
.tx-head { display: none; }
.tx {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "type end" "main end";
  column-gap: 0.75rem;
  row-gap: 0.12rem;
  align-items: baseline;
  box-sizing: border-box;
  margin: 0;
  padding: 0.7rem 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: inherit;
  font-weight: 400;
  text-decoration: none;
}
a.tx { cursor: pointer; color: inherit; text-decoration: none; }
.nft-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); gap: 0.9rem; margin: 0.4rem 0 1rem; }
html[data-shell="phone"] .nft-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.35rem; }
html[data-shell="phone"] .nft { border-radius: 0.55rem; }
html[data-shell="phone"] .nft-body { padding: 0.22rem 0.26rem 0.28rem; font-size: 0.58rem; }
html[data-shell="phone"] .nft-body strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html[data-shell="phone"] .nft-body p { display: none; }
html[data-shell="phone"] .nft-body .nft-status { display: flex; margin: 0.12rem 0 0; gap: 0.2rem; font-size: 0.6rem; }
html[data-shell="phone"] .nft-status::before { width: 0.32rem; height: 0.32rem; }
.nft-filterbar { display: flex; flex-direction: column; gap: 0.45rem; margin: 0.15rem 0 0.85rem; }
.nft-filters { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.nft-filters.issuers { padding-top: 0.45rem; border-top: 1px solid var(--line); }
.nft-filters button { display: inline-flex; align-items: center; gap: 0.35rem; width: auto; margin: 0; padding: 0.32rem 0.65rem; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--text); font: inherit; font-size: 0.78rem; font-weight: 650; line-height: 1.2; }
.nft-filters button[data-kind]::before { content: ""; width: 0.42rem; height: 0.42rem; border-radius: 50%; background: var(--line); flex: none; }
.nft-filters button[data-kind="all"]::before { background: var(--text); opacity: 0.4; }
.nft-filters button[data-kind="offer"]::before { background: var(--offer-text); }
.nft-filters button[data-kind="sale"]::before { background: var(--accent); }
.nft-filters button[data-kind="held"]::before { background: var(--muted); }
.nft-filters button.on { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.nft-filters button[data-kind="all"].on::before { background: var(--accent-ink); opacity: 1; }
.nft-filters button[data-kind="offer"].on { background: var(--offer); color: var(--offer-ink); }
.nft-filters button[data-kind="offer"].on::before { background: var(--offer-ink); }
.nft-filters button[data-kind="sale"].on::before { background: var(--accent-ink); }
.nft-filters button[data-kind="held"].on { background: var(--surface-2); color: var(--text); border-color: var(--muted); }
@media (hover: hover) { .nft-filters button:not(.on):hover { background: var(--surface-2); } }
html[data-shell="phone"] .nft-filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
html[data-shell="phone"] .nft-filters::-webkit-scrollbar { display: none; }
html[data-shell="phone"] .nft-filters button { padding: 0.28rem 0.5rem; font-size: 0.68rem; }
.nft { position: relative; display: flex; flex-direction: column; min-width: 0; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 1rem; background: var(--surface); overflow: hidden; }
.nft-art { display: flex; align-items: center; justify-content: center; aspect-ratio: 5 / 7; background: var(--surface-2); }
.nft-art img { width: 100%; height: 100%; object-fit: contain; background: transparent; }
.nft-fallback { padding: 1rem; color: var(--muted); font-size: 0.85rem; font-weight: 650; text-align: center; overflow-wrap: anywhere; }
.nft-body { padding: 0.75rem 0.85rem 0.95rem; }
.nft-body strong, .nft .mono { display: block; overflow-wrap: anywhere; }
.nft-body p { margin: 0.25rem 0; }
.nft-sale { font-weight: 650; }
.nft-status { display: flex; align-items: center; gap: 0.35rem; margin: 0.45rem 0 0; color: var(--muted); font-size: 0.78rem; font-weight: 700; line-height: 1.2; }
.nft-status::before { content: ""; width: 0.45rem; height: 0.45rem; border-radius: 50%; background: currentColor; flex: none; }
.nft-status span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nft-status .nft-pricebit { flex: none; }
.nft-status .nft-pricebit::before { content: " · "; }
html[data-shell="phone"] .nft-state { display: none; }
html[data-shell="phone"] .nft-pricebit::before { content: none; }
.nft-offer { margin: 0.25rem 0; color: var(--warn); font-weight: 700; }
button.nft, a.nft { display: flex; flex-direction: column; width: 100%; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 1rem; background: var(--surface); color: inherit; font: inherit; font-weight: 400; text-align: left; text-decoration: none; cursor: pointer; }
button.nft strong, a.nft strong { font-weight: 650; }
.nft.incoming { box-shadow: inset 4px 0 0 var(--offer-text); }
.nft.listed { box-shadow: inset 4px 0 0 var(--accent); }
.nft.held { box-shadow: inset 4px 0 0 var(--muted); }
.nft.incoming .nft-status { color: var(--offer-text); }
.nft.listed .nft-status { color: var(--accent); }
.nft.held .nft-status { color: var(--muted); }
.nft-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.nft-actions a.b { width: auto; display: inline-block; margin: 0.35rem 0 0; padding: 0.45rem 0.75rem; }
.nft-overlay { position: fixed; inset: 0; z-index: 40; display: flex; align-items: safe center; justify-content: center; box-sizing: border-box; padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom)); background: rgba(6, 8, 12, 0.84); overflow: auto; }
html[data-shell="phone"] .nft-overlay { background: #0c0f14; padding: calc(0.75rem + env(safe-area-inset-top)) 1rem calc(1rem + env(safe-area-inset-bottom)); touch-action: pan-y; }
html[data-shell="desk"] .nft-overlay { background: #0c0f14; align-items: stretch; padding: 1.25rem clamp(1.5rem, 3vw, 3rem); }
html[data-shell="desk"] .nft-dialog { width: 100%; max-width: none; min-height: calc(100dvh - 2.5rem); box-sizing: border-box; justify-content: center; }
html[data-shell="desk"] .nft-sheet { display: flex; align-items: center; overflow: visible; }
html[data-shell="desk"] .nft-overlay .nft-page { display: grid; grid-template-columns: minmax(16rem, 1fr) minmax(22rem, 1fr); justify-content: center; align-items: center; column-gap: clamp(2rem, 4vw, 4.5rem); width: 100%; }
html[data-shell="desk"] .nft-overlay .nft-stage { width: min(100%, calc((100dvh - 9rem) * 5 / 7), 34rem); justify-self: end; }
html[data-shell="desk"] .nft-overlay .nft-detail { align-items: stretch; gap: 1.35rem; justify-self: start; width: min(100%, 42rem); }
html[data-shell="desk"] .nft-overlay .nft-caption { text-align: left; }
html[data-shell="desk"] .nft-overlay .nft-caption strong { font-size: 1.7rem; line-height: 1.15; margin-top: 0.35rem; }
html[data-shell="desk"] .nft-overlay .nft-caption .nft-price { font-size: 1.35rem; }
html[data-shell="desk"] .nft-overlay .nft-id span,
html[data-shell="desk"] .nft-overlay code.nft-id-field { text-align: left; }
html[data-shell="desk"] .nft-overlay .nft-id button { align-self: flex-start; }
html[data-shell="desk"] .nft-overlay .nft-overlay-actions { justify-content: flex-start; }
html[data-shell="desk"] .nft-overlay .sale-actions { display: grid; grid-template-columns: 12rem minmax(0, 1fr); grid-template-areas: "code buy" "note note"; align-items: center; justify-items: stretch; gap: 0.85rem 1.25rem; }
html[data-shell="desk"] .nft-overlay .sale-qr { display: contents; }
html[data-shell="desk"] .nft-overlay .sale-qr canvas.qr { grid-area: code; width: 12rem; justify-self: start; }
html[data-shell="desk"] .nft-overlay .sale-qr .m { grid-area: note; margin: 0; text-align: left; }
html[data-shell="desk"] .nft-overlay .sale-buy { grid-area: buy; align-self: center; }
.nft-overlay[hidden] { display: none !important; }
.nft-dialog { width: min(22rem, 100%); margin: auto; display: flex; flex-direction: column; align-items: center; gap: 0.75rem; }
.nft-sheet { width: 100%; overflow: hidden; }
.nft-page { display: flex; flex-direction: column; align-items: center; gap: 0.75rem; width: 100%; }
.nft-detail { display: flex; flex-direction: column; align-items: center; gap: 0.75rem; width: 100%; }
.nft-page.slide { transition: transform 240ms ease; }
.nft-stage { position: relative; width: min(20rem, 86vw); border-radius: 1.15rem; }
html[data-shell="phone"] .nft-stage { width: 100%; }
.nft-overlay .nft-stage.incoming { box-shadow: 0 0 0 2px #ffd38a; }
.nft-overlay .nft-stage.listed { box-shadow: 0 0 0 2px #8dffc1; }
.nft-overlay .nft-stage.held { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.28); }
@media (prefers-reduced-motion: reduce) { .nft-page.slide { transition: none; } }
.nft-overlay .nft-art { width: 100%; border-radius: 1.15rem; background: transparent; }
.nft-caption { color: #f4f7fb; text-align: center; }
.nft-caption strong { display: block; }
.nft-caption p { margin: 0.15rem 0; color: #d5deea; }
.nft-caption .nft-price { margin-top: 0.2rem; color: #f4f7fb; font-weight: 650; }
.nft-pill { display: inline-flex; align-items: center; gap: 0.35rem; margin: 0 0 0.2rem; padding: 0.22rem 0.6rem; border-radius: 999px; font-size: 0.75rem; font-weight: 700; line-height: 1.2; }
.nft-pill::before { content: ""; width: 0.4rem; height: 0.4rem; border-radius: 50%; background: currentColor; flex: none; }
.nft-pill.offer { background: #ffd38a; color: #1a1204; }
.nft-pill.offer::before { background: #1a1204; }
.nft-pill.sale { background: #8dffc1; color: #042; }
.nft-pill.sale::before { background: #042; }
.nft-pill.held { background: transparent; color: #d5deea; border: 1px solid rgba(255, 255, 255, 0.35); }
.nft-pill.held::before { background: #d5deea; }
.nft-overlay-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; width: 100%; }
.nft-overlay .nft-sell, .nft-overlay .sale-actions { flex-basis: 100%; width: 100%; }
.nft-overlay .sale-actions { align-items: center; }
.nft-overlay .sale-actions a.sale-buy { width: 100%; }
html[data-shell="desk"] .nft-overlay .sale-actions:has(canvas.qr) .sale-buy { display: block; }
.nft-overlay .nft-sell input {
  background: rgba(255, 255, 255, 0.06);
  color: #f4f7fb;
  border-color: rgba(255, 255, 255, 0.28);
}
.nft-overlay .nft-sell input::placeholder { color: #93a0b5; }
.nft-overlay-actions button, .nft-overlay-actions a.b { width: auto; margin: 0; padding: 0.7rem 1rem; }
.nft-overlay .nft-sell a.b { width: 100%; margin: 0.35rem 0 0; }
.nft-overlay-actions a.b.g { color: #f4f7fb; border-color: rgba(255, 255, 255, 0.35); }
.nft-id { width: 100%; display: flex; flex-direction: column; align-items: stretch; gap: 0.35rem; }
.nft-id span { text-align: center; }
code.nft-id-field {
  display: block; width: 100%; box-sizing: border-box; margin: 0;
  padding: 0.45rem 0.55rem; border-radius: 0.55rem;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  font: 0.75rem/1.35 ui-monospace, SFMono-Regular, Menlo, monospace;
  word-break: break-all; user-select: text; -webkit-user-select: text; text-align: center;
}
.nft-overlay .nft-id span, .nft-overlay .nft-id-field { color: #f4f7fb; }
.nft-overlay code.nft-id-field { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.28); color: #f4f7fb; }
.nft-id button { width: auto; align-self: center; margin: 0; padding: 0.4rem 0.8rem; }
.nft-overlay .nft-id button { background: transparent; color: #f4f7fb; border: 1px solid rgba(255, 255, 255, 0.35); }
a.nft-shoplink {
  display: inline-flex; align-items: center; width: auto; margin: 0; padding: 0.32rem 0.65rem;
  border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--text);
  font: inherit; font-size: 0.78rem; font-weight: 650; text-decoration: none;
}
.nft-pager { display: flex; align-items: center; justify-content: center; gap: 0.85rem; color: #f4f7fb; }
.nft-count { margin: 0; }
button.nft-close, button.nft-step { width: auto; margin: 0; padding: 0; background: transparent; color: #f4f7fb; border: 1px solid rgba(255, 255, 255, 0.35); font: inherit; font-weight: 650; }
button.nft-close { align-self: flex-end; height: 2rem; padding: 0 0.75rem; border-radius: 999px; }
button.nft-step { width: 2.25rem; height: 2.25rem; border-radius: 999px; font-size: 1.2rem; line-height: 1; }
button.nft-step:disabled { opacity: 0.35; }
html:has(.nft-overlay:not([hidden])) { overflow: hidden; }
html[data-shell="phone"]:has(.nft-overlay:not([hidden])) .nft-grid { visibility: hidden; }
html[data-shell="desk"]:has(.nft-overlay:not([hidden])) .nft-grid { visibility: hidden; }
.tx-type { grid-area: type; font-weight: 650; font-size: 1rem; color: var(--text); }
.tx-main {
  grid-area: main;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.8125rem;
  line-height: 1.35;
  color: var(--muted);
  font-weight: 400;
}
html[data-shell="phone"] .tx-main:empty { display: none; }
.tx-end { grid-area: end; display: flex; align-items: baseline; justify-content: flex-end; gap: 0.45rem; white-space: nowrap; }
.tx-hash { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.75rem; font-weight: 400; color: var(--muted); }
.tx-flag { font-size: 0.75rem; font-weight: 650; color: var(--danger); }
.tx.offer { grid-template-columns: 2.6rem minmax(0, 1fr) auto; grid-template-areas: "art type end" "art main end"; align-items: center; cursor: pointer; }
.tx-art { grid-area: art; width: 2.4rem; height: 3.3rem; object-fit: contain; border-radius: 0.35rem; background: var(--surface-2); }
.tx-art-fallback { display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 0.75rem; font-weight: 700; }
.tx-actions { grid-area: actions; display: flex; flex-wrap: wrap; gap: 0.4rem; padding-top: 0.35rem; }
.tx-actions button, .tx-actions a.b { width: auto; display: inline-block; margin: 0; padding: 0.4rem 0.7rem; }
.tx.bad .tx-type { color: var(--danger); }
a.tx:hover { background: var(--surface-2); color: inherit; text-decoration: none; }
a.tx:active { background: var(--line); color: inherit; }
a.tx:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
html[data-shell="phone"] main { max-width: 32rem; margin: auto; padding-bottom: calc(5.6rem + env(safe-area-inset-bottom)); }
html[data-shell="phone"] #frame, html[data-shell="phone"] .stage, html[data-shell="phone"] .panel { min-width: 0; max-width: 100%; }
html[data-shell="phone"] .head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin: 0 0 0.2rem; }
html[data-shell="phone"] .head h1 { margin: 0; min-width: 0; }
html[data-shell="phone"] .head-actions { display: flex; align-items: center; gap: 0.4rem; flex: none; }
html[data-shell="phone"] button.theme,
html[data-shell="phone"] a.theme {
  width: auto;
  height: 2rem;
  margin: 0;
  padding: 0 0.7rem;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 650;
  text-decoration: none;
}
html[data-shell="phone"] .panel h2 { display: none; }
html[data-shell="phone"] #settings h2,
html[data-shell="phone"] #transfer h2,
html[data-shell="phone"] #send h2,
html[data-shell="phone"] #receive h2,
html[data-shell="phone"] #nfts h2,
html[data-shell="phone"] #shop h2 { display: block; }
html[data-shell="phone"] #receive.on { margin-top: 1.4rem; padding-top: 0.35rem; border-top: 1px solid var(--line); }
.seg { display: flex; gap: 0.4rem; margin: 0 0 1rem; }
.seg button { flex: 1 1 0; width: auto; margin: 0; padding: 0.55rem 0.4rem; background: transparent; color: var(--muted); border: 1px solid var(--line); font-weight: 650; }
.seg button.on { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.warn { color: var(--warn); }
.danger { color: var(--danger); }
html[data-shell="desk"] nav.menu { display: flex; flex-direction: column; gap: 0.15rem; margin-top: 1.1rem; }
html[data-shell="desk"] nav.menu button.tab,
html[data-shell="desk"] nav.menu a.tab { display: block; width: 100%; box-sizing: border-box; margin: 0; padding: 0.7rem 0.85rem; border: 0; border-radius: 0.7rem; background: transparent; color: var(--muted); font: inherit; font-weight: 650; text-align: left; text-decoration: none; }
html[data-shell="desk"] nav.menu button.tab.on,
html[data-shell="desk"] nav.menu a.tab.on { background: var(--accent); color: var(--accent-ink); }
html[data-shell="desk"] #layout[data-view="home"] #shop,
html[data-shell="desk"] #layout[data-view="home"] #settings,
html[data-shell="desk"] #layout[data-view="home"] #transfer,
html[data-shell="desk"] #layout[data-view="home"] #nfts { display: none; }
html[data-shell="desk"] #layout:not([data-view="home"]) .panel { display: none; }
html[data-shell="desk"] #layout[data-view="transfer"] #transfer,
html[data-shell="desk"] #layout[data-view="send"] #transfer,
html[data-shell="desk"] #layout[data-view="receive"] #transfer,
html[data-shell="desk"] #layout[data-view="nfts"] #nfts,
html[data-shell="desk"] #layout[data-view="shop"] #shop,
html[data-shell="desk"] #layout[data-view="activity"] #activity,
html[data-shell="desk"] #layout[data-view="settings"] #settings { display: block; grid-column: 1 / -1; }
label.setting { display: flex; flex-direction: column; gap: 0.25rem; margin: 0 0 0.8rem; color: var(--muted); font-size: 0.8125rem; font-weight: 650; }
.kv { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 0.35rem 0.75rem; margin: 0.2rem 0 0.6rem; font-size: 0.8125rem; }
.kv span:nth-child(odd) { color: var(--muted); }
.kv span:nth-child(even) { overflow-wrap: anywhere; }
button.side { margin-top: 0.6rem; }
button.side.on { background: var(--accent); color: var(--accent-ink); }
html[data-shell="phone"] nav.tabs {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  box-sizing: border-box;
  width: 100%;
  gap: .25rem;
  margin: 0;
  padding: .4rem .4rem calc(.45rem + env(safe-area-inset-bottom));
  background: var(--nav);
  border-top: 1px solid var(--line);
}
html[data-shell="phone"] nav.tabs button, html[data-shell="phone"] nav.tabs a {
  appearance: none;
  -webkit-appearance: none;
  display: block;
  flex: 1 1 0;
  width: auto;
  min-width: 0;
  height: 2.75rem;
  margin: 0;
  padding: 0 .2rem;
  background: transparent;
  color: var(--muted);
  border: 0;
  border-radius: .7rem;
  text-decoration: none;
  text-align: center;
  font: inherit;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: .72rem;
  font-weight: 700;
  line-height: 2.75rem;
  white-space: nowrap;
}
html[data-shell="phone"] nav.tabs button.on, html[data-shell="phone"] nav.tabs a.on { background: var(--accent); color: var(--accent-ink); }
html[data-shell="phone"] .panel { display: none; }
html[data-shell="phone"] .panel.on { display: block; }
html[data-shell="desk"] main { max-width: none; width: 100%; margin: 0; box-sizing: border-box; padding: 1.5rem 1.75rem 2.5rem; }
html[data-shell="desk"] #frame {
  display: grid;
  grid-template-columns: 16rem minmax(0, 1fr);
  gap: 1.25rem 1.75rem;
  align-items: start;
}
html[data-shell="desk"] .side { position: sticky; top: 1.25rem; min-width: 0; }
html[data-shell="desk"] .side .balance { font-size: 1.65rem; white-space: nowrap; }
html[data-shell="desk"] .side button.theme {
  width: 100%;
  height: 2.25rem;
  margin: 1rem 0 0;
  padding: 0 0.7rem;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 650;
}
html[data-shell="desk"] #layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1rem;
}
html[data-shell="desk"] .panel {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 1rem 1.05rem 1.1rem;
}
html[data-shell="desk"] #activity,
html[data-shell="desk"] #nfts,
html[data-shell="desk"] #transfer { grid-column: 1 / -1; min-width: 0; }
html[data-shell="desk"] #layout[data-view="home"] {
  grid-template-columns: minmax(0, 1fr) 22rem;
  align-items: start;
}
html[data-shell="desk"] #layout[data-view="home"] #activity { grid-column: 1; min-width: 0; }
html[data-shell="desk"] #layout[data-view="home"] #home-receive { grid-column: 2; min-width: 0; }
@media (max-width: 1100px) {
  html[data-shell="desk"] #layout[data-view="home"] { grid-template-columns: minmax(0, 1fr); }
  html[data-shell="desk"] #layout[data-view="home"] #home-receive { grid-column: 1; }
}
html[data-shell="desk"] #transfer { max-width: none; padding: 1.2rem 1.4rem 1.45rem; }
html[data-shell="desk"] #transfer .seg { max-width: 22rem; }
html[data-shell="desk"] #transfer .pay-split {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(18rem, 24rem);
  grid-template-areas: "main side" "other side";
  gap: 0.5rem 2.5rem;
  align-items: start;
}
html[data-shell="desk"] #transfer .pay-main { grid-area: main; }
html[data-shell="desk"] #transfer .pay-side { grid-area: side; }
html[data-shell="desk"] #transfer .pay-other { grid-area: other; }
html[data-shell="desk"] #transfer .pay-side .b,
html[data-shell="desk"] #transfer .pay-side button { margin-top: 0; }
html[data-shell="desk"] #transfer .pay-side .b + button { margin-top: 0.6rem; }
html[data-shell="phone"] #transfer .pay-split { display: flex; flex-direction: column; }
html[data-shell="phone"] #transfer .pay-main { order: 1; }
html[data-shell="phone"] #transfer .pay-side { order: 2; }
html[data-shell="phone"] #transfer .pay-other { order: 3; }
html[data-shell="phone"] #transfer[data-mode="receive"] .pay-side { order: 0; }
.addr { display: flex; align-items: center; gap: 0.6rem; margin: 0.2rem 0 0.6rem; }
.addr .mono { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 0.78rem; }
.addr button { width: auto; margin: 0; padding: 0.45rem 0.7rem; }
html[data-shell="desk"] #layout #transfer > .panel { display: block; margin: 0; background: transparent; border: 0; border-radius: 0; }
html[data-shell="desk"] #layout #transfer > #receive { border-top: 1px solid var(--line); }
html[data-shell="desk"] #nfts .nft { background: var(--surface-2); }
html[data-shell="desk"] #nfts .nft-art { background: var(--bg); }
html[data-shell="desk"] .tx-head {
  display: grid;
  grid-template-columns: 9.5rem minmax(0, 1fr) auto;
  column-gap: 1rem;
  padding: 0 0.75rem 0.35rem;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.04em;
}
html[data-shell="desk"] .tx {
  grid-template-columns: 9.5rem minmax(0, 1fr) auto;
  grid-template-areas: "type main end";
  column-gap: 1rem;
  row-gap: 0;
  align-items: center;
  padding: 0.7rem 0.75rem;
}
html[data-shell="desk"] .tx.offer { grid-template-columns: 2.6rem 9.5rem minmax(0, 1fr) auto; grid-template-areas: "art type main end"; }
html[data-shell="desk"] .tx-type { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html[data-shell="desk"] .tx-main { font-size: 0.95rem; color: var(--text); }
html[data-shell="desk"] #layout[data-view="home"] #activity .tx-head { display: none; }
html[data-shell="desk"] #layout[data-view="home"] #activity .tx:not(.offer) {
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "main end";
}
html[data-shell="desk"] #layout[data-view="home"] #activity .tx:not(.offer) .tx-type { display: none; }
html[data-shell="desk"] #layout[data-view="home"] #activity .tx:not(.offer) .tx-main {
  font-size: 0.95rem;
  font-weight: 650;
  color: var(--text);
}
html[data-shell="desk"] #layout[data-view="home"] #activity .tx.offer {
  grid-template-columns: 2.4rem minmax(0, 1fr) auto;
  grid-template-areas: "art type end" "art main end";
}
@media (max-width: 720px) {
  html[data-shell="desk"] .tx-head { display: none; }
  html[data-shell="desk"] .tx {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "type end" "main end";
    column-gap: 0.75rem;
    row-gap: 0.12rem;
    align-items: baseline;
    padding: 0.7rem 0;
  }
  html[data-shell="desk"] .tx.offer { grid-template-columns: 2.6rem minmax(0, 1fr) auto; grid-template-areas: "art type end" "art main end"; }
  html[data-shell="desk"] .tx-main { font-size: 0.8125rem; color: var(--muted); }
  html[data-shell="desk"] .tx-main:empty { display: none; }
}
html[data-shell="desk"] main.sale { max-width: 72rem; margin: 0 auto; }
html[data-shell="desk"] #shell { display: flex; align-items: stretch; min-height: 100vh; }
html[data-shell="desk"] #shell > main.sale { flex: 1; min-width: 0; max-width: none; margin: 0; }
html[data-shell="desk"] #nav { width: 15rem; flex: none; display: flex; flex-direction: column; gap: .25rem; padding: 1.1rem .75rem 1rem; border-right: 1px solid var(--line); position: sticky; top: 0; height: 100vh; box-sizing: border-box; }
html[data-shell="desk"] #nav .brand { display: flex; flex-direction: column; gap: .15rem; padding: .25rem .85rem 1rem; }
html[data-shell="desk"] #nav .brand span { color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .8rem; }
html[data-shell="desk"] #nav a.tab { display: block; width: 100%; box-sizing: border-box; margin: 0; padding: .7rem .85rem; border-radius: .7rem; background: transparent; color: var(--muted); font-weight: 650; text-align: left; text-decoration: none; }
html[data-shell="desk"] #nav a.tab.on { background: var(--accent); color: var(--accent-ink); }
.sale-direct { width: min(28rem, 100%); margin: 0 auto; }
.sale-direct h1, .sale-direct .mono { text-align: center; }
.sale-direct .mono { overflow-wrap: anywhere; }
html[data-shell="desk"] .sale-direct { width: auto; margin: 0; display: grid; grid-template-columns: minmax(0, 28rem) minmax(16rem, 22rem); gap: 2.5rem; align-items: start; justify-content: start; }
html[data-shell="desk"] .sale-direct h1, html[data-shell="desk"] .sale-direct .mono { text-align: left; }
html[data-shell="desk"] .sale-actions { display: flex; flex-direction: column; align-items: stretch; gap: 0.75rem; }
html[data-shell="desk"] .sale-actions .sale-links { justify-content: flex-start; }
html[data-shell="phone"] .sale-qr { display: none; }
html[data-shell="desk"] .sale-actions:has(canvas.qr) .sale-buy { display: none; }
html[data-shell="phone"] a.sale-return { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; display: flex; align-items: center; justify-content: center; box-sizing: border-box; height: calc(2.75rem + env(safe-area-inset-bottom)); margin: 0; padding: 0 .4rem env(safe-area-inset-bottom); background: var(--nav); border-top: 1px solid var(--line); color: var(--text); font-weight: 700; text-decoration: none; }
html[data-shell="phone"] body:has(a.sale-return) main.sale { padding-bottom: calc(4.2rem + env(safe-area-inset-bottom)); }
.sale-one { width: min(22rem, 100%); margin: 0.4rem auto 1rem; }
html[data-shell="desk"] .sale-one { margin-left: 0; margin-right: 0; }
html[data-shell="phone"] main.sale .nft-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; }
html[data-shell="phone"] main.sale .nft { border-radius: 0.85rem; }
html[data-shell="phone"] main.sale .nft-body { padding: 0.45rem 0.5rem 0.55rem; font-size: 0.75rem; }
html[data-shell="phone"] main.sale .nft-state { display: inline; }
html[data-shell="phone"] main.sale .nft-pricebit::before { content: " · "; }
.nft-edition { display: block; margin: 0.25rem 0; color: var(--muted); font-size: 0.85rem; }
.sale-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; margin: 0.4rem 0 1rem; }
.sale-links a.b { width: auto; margin: 0; padding: 0.7rem 1rem; }
.qrbox { display: flex; justify-content: center; margin: 0.4rem 0 0.8rem; }
canvas.qr { width: min(16rem, 100%); height: auto; background: #fff; border-radius: 0.8rem; }
