/* UTN Explorer v2: one grid, sections, compact rows. */
:root {
  --bg: #f6f8fb; --surface: #fff; --surface-2: #f9fafc; --line: #e3e8ef; --line-2: #eef1f5;
  --text: #0b1b33; --text-2: #46566c; --muted: #6b7a8f; --faint: #98a3b3;
  --accent: #2f5bea; --accent-2: #eef2ff; --accent-ink: #1e40c4;
  --ok: #0f8a5f; --ok-bg: #e7f6ef; --bad: #c8233f; --bad-bg: #fdecef; --warn: #a86500; --warn-bg: #fff4e0;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --r: 8px; --r-sm: 6px; --gap: 16px; --pad: 16px; --row: 44px; --max: 1240px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04);
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #0b1220; --surface: #111a2b; --surface-2: #0f1727; --line: #1f2b40; --line-2: #182336;
  --text: #e7edf6; --text-2: #b5c1d3; --muted: #8796ad; --faint: #5f6e86;
  --accent: #6e8dff; --accent-2: #18244a; --accent-ink: #a9bbff;
  --ok: #3ccf91; --ok-bg: #0f2e24; --bad: #ff6b81; --bad-bg: #3a1620; --warn: #f2b14c; --warn-bg: #33270f;
  --shadow: none; color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.45 var(--sans); font-feature-settings: "tnum"; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 2px; }
button { font: inherit; color: inherit; }
.mono { font-family: var(--mono); font-size: 12.5px; letter-spacing: -.01em; }
.muted { color: var(--muted); } .faint { color: var(--faint); } .ok { color: var(--ok); } .bad { color: var(--bad); }
.nowrap { white-space: nowrap; } .r { text-align: right; } .num { font-variant-numeric: tabular-nums; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 20px; height: 56px; position: relative; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 650; letter-spacing: -.01em; white-space: nowrap; }
.brand:hover { text-decoration: none; color: var(--text); }
.brand .mark { width: 26px; height: 26px; border-radius: 7px; background: linear-gradient(135deg, #2f5bea, #0b1b33); display: grid; place-items: center; flex: none; }
.brand .mark svg { width: 16px; height: 16px; }
.brand small { font-weight: 500; color: var(--muted); }
.nav { display: flex; gap: 2px; }
.nav a { color: var(--text-2); padding: 6px 10px; border-radius: var(--r-sm); font-weight: 500; }
.nav a:hover { background: var(--surface-2); text-decoration: none; color: var(--text); }
.nav a.on { color: var(--text); background: var(--line-2); }
.top .grow { flex: 1; }
.acts-r { display: flex; gap: 8px; align-items: center; }
.search { position: relative; flex: 1; max-width: 400px; }
.search input { width: 100%; height: 36px; border: 1px solid var(--line); background: var(--surface-2); border-radius: var(--r-sm); padding: 0 12px 0 34px; font: inherit; color: var(--text); outline: none; -webkit-appearance: none; }
.search input:focus { border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 3px var(--accent-2); }
.search > svg { position: absolute; left: 11px; top: 10px; width: 16px; height: 16px; color: var(--faint); }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 550; border: 1px solid var(--line); background: var(--surface); color: var(--text-2); white-space: nowrap; }
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 20%, transparent); }
.iconbtn { width: 34px; height: 34px; display: inline-grid; place-items: center; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); cursor: pointer; color: var(--text-2); padding: 0; flex: none; }
.iconbtn svg { width: 16px; height: 16px; }
.menu-btn, .search-btn { display: none; }

main { padding: 20px 0 48px; min-height: calc(100vh - 140px); }
.ph { display: flex; align-items: flex-start; gap: 14px; margin: 4px 0 16px; }
.ph .ttl { min-width: 0; flex: 1; }
.ph h1 { font-size: 20px; line-height: 28px; margin: 0; font-weight: 650; letter-spacing: -.015em; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ph .sub { color: var(--muted); margin-top: 2px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; min-width: 0; }
.ph .acts { display: flex; gap: 8px; }
.crumb { font-size: 11.5px; color: var(--muted); margin-bottom: 2px; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); }
.grid + .grid, .grid + .sec, .sec + .grid { margin-top: var(--gap); }
.s12 { grid-column: span 12; } .s8 { grid-column: span 8; } .s7 { grid-column: span 7; } .s6 { grid-column: span 6; } .s5 { grid-column: span 5; } .s4 { grid-column: span 4; }

.sec { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); min-width: 0; }
.sec + .sec { margin-top: var(--gap); }
.grid > .sec + .sec { margin-top: 0; }
.sec > header { display: flex; align-items: center; gap: 12px; padding: 10px var(--pad); border-bottom: 1px solid var(--line-2); min-height: 46px; }
.sec > header h2 { font-size: 14px; margin: 0; font-weight: 620; letter-spacing: -.005em; white-space: nowrap; }
.sec > header .meta { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sec > header .end { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.sec > footer { padding: 10px var(--pad); border-top: 1px solid var(--line-2); display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; }
.sec .body { padding: var(--pad); }
.empty { padding: 28px var(--pad); text-align: center; color: var(--muted); }

.stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.stat { padding: 13px var(--pad); border-right: 1px solid var(--line-2); min-width: 0; }
.stat:last-child { border-right: 0; }
.stat .k { font-size: 12px; color: var(--muted); font-weight: 500; display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.stat .v { font-size: 18px; font-weight: 640; letter-spacing: -.015em; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat .v small { font-size: 12.5px; font-weight: 500; color: var(--muted); letter-spacing: 0; }

.kv { display: grid; grid-template-columns: 210px minmax(0, 1fr); margin: 0; }
.kv > dt, .kv > dd { padding: 10px var(--pad); border-bottom: 1px solid var(--line-2); margin: 0; min-height: 41px; }
.kv > dt { color: var(--muted); font-weight: 500; }
.kv > dd { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.kv > dt:nth-last-child(2), .kv > dd:last-child { border-bottom: 0; }

.lh, .lr { display: grid; grid-template-columns: var(--cols); column-gap: 14px; align-items: center; padding: 0 var(--pad); }
.lh { height: 34px; font-size: 12px; color: var(--muted); font-weight: 550; background: var(--surface-2); border-bottom: 1px solid var(--line-2); }
.lr { min-height: var(--row); border-bottom: 1px solid var(--line-2); padding-top: 6px; padding-bottom: 6px; color: var(--text); }
.lr:last-child { border-bottom: 0; }
.lr:hover { background: var(--surface-2); }
.lr > *, .lh > * { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lr .stack { display: flex; flex-direction: column; gap: 1px; }
.lr .stack > * { overflow: hidden; text-overflow: ellipsis; }
.ml { display: none; }

.addr { display: inline-flex; align-items: center; gap: 6px; min-width: 0; max-width: 100%; vertical-align: middle; }
.addr > a, .addr > span.t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.idn { width: 16px; height: 16px; border-radius: 4px; flex: none; display: block; }
.idn.lg { width: 40px; height: 40px; border-radius: 10px; }
.copy { flex: none; width: 22px; height: 22px; border: 0; background: transparent; border-radius: 5px; display: inline-grid; place-items: center; color: var(--faint); cursor: pointer; padding: 0; }
.copy:hover { background: var(--line-2); color: var(--text-2); }
.copy svg { width: 13px; height: 13px; }
.copy.done { color: var(--ok); }
.full { word-break: break-all; }
.short { display: none; }
.tag { display: inline-flex; align-items: center; gap: 5px; height: 20px; padding: 0 7px; border-radius: 5px; font-size: 11.5px; font-weight: 600; background: var(--line-2); color: var(--text-2); white-space: nowrap; letter-spacing: .01em; vertical-align: middle; }
.tag.ok { background: var(--ok-bg); color: var(--ok); } .tag.bad { background: var(--bad-bg); color: var(--bad); } .tag.warn { background: var(--warn-bg); color: var(--warn); }
.tag.acc { background: var(--accent-2); color: var(--accent-ink); }
.tag.method { font-family: var(--mono); font-weight: 500; max-width: 130px; overflow: hidden; text-overflow: ellipsis; display: inline-block; line-height: 20px; }
.tag svg { width: 12px; height: 12px; }
.st { width: 18px; height: 18px; border-radius: 50%; display: inline-grid; place-items: center; flex: none; vertical-align: middle; }
.st.ok { background: var(--ok-bg); color: var(--ok); } .st.bad { background: var(--bad-bg); color: var(--bad); }
.st svg { width: 11px; height: 11px; }
.arrow { color: var(--faint); flex: none; width: 14px; height: 14px; }
.bar { width: 64px; height: 4px; border-radius: 2px; background: var(--line-2); overflow: hidden; display: inline-block; vertical-align: middle; }
.bar > i { display: block; height: 100%; background: var(--accent); min-width: 2px; }
.btn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface); color: var(--text); font-weight: 550; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--surface-2); text-decoration: none; color: var(--text); }
.btn.pri { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.pri:hover { background: var(--accent-ink); color: #fff; }
.btn:disabled, .btn.dis { opacity: .45; cursor: default; pointer-events: none; }
.btn svg { width: 14px; height: 14px; }
.btn.sm { height: 28px; padding: 0 10px; font-size: 13px; }

.tabs { display: flex; gap: 2px; padding: 0 8px; border-bottom: 1px solid var(--line-2); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { padding: 12px 10px 11px; color: var(--muted); font-weight: 550; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.on { color: var(--text); border-bottom-color: var(--accent); }
.tabs a .n { font-size: 11.5px; color: var(--faint); margin-left: 4px; font-weight: 500; }

.banner { display: flex; gap: 12px; align-items: flex-start; padding: 12px var(--pad); border-radius: var(--r); border: 1px solid; margin-bottom: var(--gap); min-width: 0; }
.banner.ok { background: var(--ok-bg); border-color: color-mix(in srgb, var(--ok) 25%, transparent); }
.banner.bad { background: var(--bad-bg); border-color: color-mix(in srgb, var(--bad) 25%, transparent); }
.banner > div { min-width: 0; overflow-wrap: anywhere; }
.banner b { display: block; }
.banner .st { width: 22px; height: 22px; margin-top: 1px; background: var(--surface); }

.log { display: grid; grid-template-columns: 44px minmax(0, 1fr); border-bottom: 1px solid var(--line-2); }
.log:last-child { border-bottom: 0; }
.log .ix { padding: 13px 0 0 var(--pad); color: var(--faint); font-family: var(--mono); font-size: 12px; }
.log .lb { padding: 12px var(--pad) 12px 0; min-width: 0; display: grid; gap: 8px; }
.ev { font-family: var(--mono); font-size: 13px; overflow-wrap: anywhere; }
.ev b { color: var(--text); font-weight: 600; }
.ev .ty { color: var(--muted); }
.params { width: 100%; border: 1px solid var(--line-2); border-radius: var(--r-sm); border-collapse: separate; border-spacing: 0; overflow: hidden; table-layout: fixed; }
.params th, .params td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--line-2); font-size: 13px; vertical-align: top; overflow: hidden; }
.params tr:last-child td { border-bottom: 0; }
.params th { background: var(--surface-2); font-weight: 550; color: var(--muted); font-size: 12px; }
.params td.v { overflow-wrap: anywhere; }
.params .c1 { width: 130px; } .params .c2 { width: 90px; }
pre.code { margin: 0; font: 12.5px/1.6 var(--mono); background: var(--surface-2); border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 12px 12px 12px 0; overflow: auto; max-height: 520px; tab-size: 4; }
pre.code .ln { color: var(--faint); user-select: none; display: inline-block; width: 4ch; text-align: right; margin-right: 14px; }
pre.code .kw { color: #7a3ff0; } pre.code .cm { color: var(--faint); font-style: italic; } pre.code .s { color: #0f8a5f; } pre.code .ty { color: #1e6fd9; }
[data-theme="dark"] pre.code .kw { color: #c4a5ff; } [data-theme="dark"] pre.code .ty { color: #7cb7ff; } [data-theme="dark"] pre.code .s { color: #6fdcaa; }
.raw { font-family: var(--mono); font-size: 12px; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 10px; overflow-wrap: anywhere; word-break: break-all; max-height: 180px; overflow: auto; margin: 0; }
.topics { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 2px 8px; font-family: var(--mono); font-size: 12px; color: var(--text-2); }
.topics span:nth-child(odd) { color: var(--faint); }
.topics span { overflow-wrap: anywhere; word-break: break-all; }
.filebar { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }

.fn { border-bottom: 1px solid var(--line-2); }
.fn:last-child { border-bottom: 0; }
.fn > summary { list-style: none; cursor: pointer; padding: 10px var(--pad); display: flex; gap: 10px; align-items: center; font-family: var(--mono); font-size: 13px; min-width: 0; }
.fn > summary > span:not(.i) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fn > summary::-webkit-details-marker { display: none; }
.fn > summary .i { color: var(--faint); width: 22px; font-size: 12px; flex: none; }
.fn > summary .chev { margin-left: auto; color: var(--faint); transition: transform .15s; flex: none; width: 14px; height: 14px; }
.fn[open] > summary .chev { transform: rotate(90deg); }
.fn .fb { padding: 0 var(--pad) 14px 48px; display: grid; gap: 8px; }
.fn label { display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
.fn input { height: 34px; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 0 10px; font: 13px var(--mono); background: var(--surface); color: var(--text); width: 100%; outline: none; min-width: 0; }
.fn input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-2); }
.fn .out { font-family: var(--mono); font-size: 12.5px; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 8px 10px; overflow-wrap: anywhere; word-break: break-all; }
.fn .out.err { color: var(--bad); background: var(--bad-bg); }
.fn .row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.wallet { display: flex; gap: 10px; align-items: center; padding: 10px var(--pad); border-bottom: 1px solid var(--line-2); background: var(--surface-2); font-size: 13px; flex-wrap: wrap; }

.items { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; padding: var(--pad); }
.item { border: 1px solid var(--line-2); border-radius: var(--r); overflow: hidden; background: var(--surface); color: var(--text); display: block; }
.item:hover { text-decoration: none; border-color: var(--line); box-shadow: 0 2px 8px rgba(16,24,40,.06); color: var(--text); }
.item .art { aspect-ratio: 1; display: block; width: 100%; height: auto; }
.item .meta { padding: 8px 10px; display: grid; gap: 1px; font-size: 12.5px; min-width: 0; }
.item .meta > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .meta b { font-weight: 600; }
.nft-hero { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: var(--gap); align-items: start; }
.nft-hero .artbox { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 10px; }
.nft-hero .art { width: 100%; aspect-ratio: 1; height: auto; border-radius: var(--r-sm); display: block; }

.pager { display: flex; gap: 6px; align-items: center; }
.pager .pg { color: var(--muted); font-size: 12.5px; padding: 0 6px; white-space: nowrap; }

.hero { display: flex; align-items: center; gap: 24px; justify-content: space-between; margin: 4px 0 16px; }
.hero h1 { font-size: 22px; margin: 0; letter-spacing: -.02em; font-weight: 680; }
.hero p { margin: 2px 0 0; color: var(--muted); }
.hero .search { max-width: 520px; }
.hero .search input { height: 42px; font-size: 14.5px; background: var(--surface); box-shadow: var(--shadow); }
.hero .search > svg { top: 13px; }
.netrow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.netrow > div { padding: 11px var(--pad); border-right: 1px solid var(--line-2); min-width: 0; }
.netrow > div:last-child { border-right: 0; }
.netrow .k { font-size: 12px; color: var(--muted); }
.netrow .v { margin-top: 2px; display: flex; align-items: center; gap: 6px; min-width: 0; }
.netrow .v > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

.foot { border-top: 1px solid var(--line); background: var(--surface); }
.foot .wrap { display: flex; gap: 16px; justify-content: space-between; align-items: center; padding: 18px 24px; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.foot a { color: var(--text-2); }
.foot .links { display: flex; gap: 16px; flex-wrap: wrap; }

.skel { background: linear-gradient(90deg, var(--line-2), var(--surface-2), var(--line-2)); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 4px; height: 12px; display: inline-block; width: 120px; }
@keyframes sk { to { background-position: -200% 0; } }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--text); color: var(--surface); padding: 8px 14px; border-radius: 8px; font-size: 13px; z-index: 50; opacity: 0; transition: opacity .2s; pointer-events: none; }
.toast.on { opacity: 1; }
.nf { text-align: center; padding: 52px var(--pad); }
.nf .code { font: 600 12px var(--mono); color: var(--muted); letter-spacing: .12em; }
.nf h1 { font-size: 21px; margin: 8px 0 6px; letter-spacing: -.02em; }
.nf p { color: var(--muted); margin: 0 auto 18px; max-width: 460px; overflow-wrap: anywhere; }
.nf .acts { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }

.drawer { display: none; }

@media (max-width: 1080px) {
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stat:nth-child(3) { border-right: 0; }
  .stat:nth-child(-n+3) { border-bottom: 1px solid var(--line-2); }
  .s8, .s7, .s6, .s5, .s4 { grid-column: span 12; }
  .nav { display: none; }
  .menu-btn { display: inline-grid; }
  .top .grow { display: none; }
  .top .search { margin-left: auto; }
}
@media (max-width: 720px) {
  :root { --pad: 14px; --gap: 12px; }
  .wrap { padding: 0 12px; }
  .top .wrap { height: 52px; gap: 10px; }
  .brand small, .top .pill.net { display: none; }
  .top .search { display: none; }
  .search-btn { display: inline-grid; }
  .acts-r { margin-left: auto; }
  .top.searching .search { display: block; position: absolute; left: 12px; right: 56px; top: 8px; max-width: none; }
  .top.searching .brand, .top.searching .search-btn, .top.searching .theme-btn { visibility: hidden; }
  main { padding: 12px 0 32px; }
  .hero { flex-direction: column; align-items: stretch; gap: 12px; margin-bottom: 12px; }
  .hero h1 { font-size: 19px; }
  .hero .search { display: block; max-width: none; }
  .ph { margin-bottom: 12px; gap: 12px; }
  .ph h1 { font-size: 18px; line-height: 24px; gap: 8px; }
  .ph .acts { display: none; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { padding: 10px var(--pad); border-bottom: 1px solid var(--line-2); }
  .stat:nth-child(3) { border-right: 1px solid var(--line-2); }
  .stat:nth-child(2n) { border-right: 0; }
  .stat:nth-last-child(-n+2) { border-bottom: 0; }
  .stat .v { font-size: 16px; }
  .netrow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .netrow > div:nth-child(2n) { border-right: 0; }
  .netrow > div:nth-child(-n+2) { border-bottom: 1px solid var(--line-2); }
  .kv { grid-template-columns: minmax(0, 1fr); }
  .kv > dt { border-bottom: 0; padding-bottom: 0; min-height: 0; font-size: 12px; }
  .kv > dd { padding-top: 2px; padding-bottom: 9px; min-height: 0; }
  .full { display: none; } .short { display: inline; }
  .lh { display: none; }
  .lr { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "a b" "c d"; row-gap: 3px; padding-top: 9px; padding-bottom: 9px; }
  .lr > * { display: none; }
  .lr > .m1 { display: block; grid-area: a; } .lr > .m2 { display: block; grid-area: b; text-align: right; }
  .lr > .m3 { display: block; grid-area: c; font-size: 12.5px; color: var(--muted); } .lr > .m4 { display: block; grid-area: d; text-align: right; font-size: 12.5px; color: var(--muted); }
  .lr > .addr.m1, .lr > .addr.m3 { display: inline-flex; }
  .ml { display: inline; color: var(--faint); }
  .tag.method { max-width: 104px; }
  .log { grid-template-columns: 30px minmax(0, 1fr); }
  .log .ix { padding-left: 12px; }
  .params .c1 { width: 86px; } .params .c2, .params .ty { display: none; }
  .fn .fb { padding-left: var(--pad); }
  .nft-hero { grid-template-columns: minmax(0, 1fr); }
  .nft-hero .artbox { max-width: 360px; width: 100%; margin: 0 auto; }
  .items { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 12px; }
  .sec > footer { flex-wrap: wrap; }
  .banner { padding: 10px var(--pad); }
  .foot .wrap { padding: 16px 12px; }
  .drawer.on { display: block; position: fixed; top: 52px; left: 0; right: 0; bottom: 0; background: var(--surface); z-index: 30; padding: 4px 12px; border-top: 1px solid var(--line); }
  .drawer a { display: flex; align-items: center; justify-content: space-between; padding: 14px 4px; border-bottom: 1px solid var(--line-2); color: var(--text); font-weight: 550; font-size: 15px; }
  .drawer a:hover { text-decoration: none; }
}
@media (max-width: 1080px) and (min-width: 721px) {
  .drawer.on { display: block; position: fixed; top: 60px; right: 24px; width: 240px; background: var(--surface); z-index: 30; padding: 6px; border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 8px 24px rgba(16,24,40,.12); }
  .drawer a { display: block; padding: 9px 12px; color: var(--text); border-radius: var(--r-sm); }
}

/* ---- v2 additions ---- */
.lr > .x { display: none; }
.mo { display: none; }
.b { font-weight: 600; }
.fw { font-weight: 500; }
.sm { font-size: 12.5px; }
.sp { flex: 1; }
.w100 { width: 100%; }
.bar.w90 { width: 90px; }
.ell { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mono.h { font-size: 17px; font-weight: 600; }
.addr.lv { max-width: 100%; }
.tag.method.wide { max-width: none; }
.stackb { display: grid; gap: 10px; }
.bt { border-top: 1px solid var(--line-2); }
pre.code.np { padding-left: 12px; }
.pf { display: flex; justify-content: flex-end; padding: 10px var(--pad); border-top: 1px solid var(--line-2); }
.note { padding: 10px var(--pad); border-top: 1px solid var(--line-2); font-size: 12.5px; color: var(--muted); background: var(--surface-2); border-radius: 0 0 var(--r) var(--r); }
.code { font: 600 11.5px var(--mono); color: var(--text-2); background: var(--line-2); border-radius: 4px; padding: 2px 6px; flex: none; }
.btn.on { border-color: var(--accent); color: var(--accent-ink); background: var(--accent-2); }
.tabs.sub { background: var(--surface-2); }
.stats.s4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stats.s4 .stat:nth-child(4) { border-right: 0; }
.bk { width: 26px; height: 26px; border-radius: 6px; background: var(--line-2); color: var(--muted); display: inline-grid; place-items: center; flex: none; }
.bk svg { width: 14px; height: 14px; }
.lr.hr { --cols: minmax(0, 1fr) auto; grid-template-areas: "a b" "c d"; row-gap: 2px; padding-top: 9px; padding-bottom: 9px; }
.lr.hr > .m1 { grid-area: a; } .lr.hr > .m2 { grid-area: b; text-align: right; }
.lr.hr > .m3 { grid-area: c; font-size: 12.5px; color: var(--muted); } .lr.hr > .m4 { grid-area: d; text-align: right; font-size: 12.5px; color: var(--muted); }
.lr.hr .st { margin-right: 2px; }
.lr.hr > .m1 .addr { gap: 8px; }
.sec > footer a { font-weight: 550; }
.top kbd { position: absolute; right: 8px; top: 8px; font: 500 11px var(--mono); color: var(--faint); border: 1px solid var(--line); border-radius: 4px; padding: 1px 6px; background: var(--surface); }
.lhd { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; font-size: 13px; }
.wallet svg { width: 16px; height: 16px; color: var(--muted); flex: none; }
.nf .search { max-width: 480px; margin: 0 auto 14px; display: block; }
.nf .search input { height: 40px; background: var(--surface); }
.nf .search > svg { top: 12px; }

/* modal + QR */
.modal { position: fixed; inset: 0; background: rgba(11, 27, 51, .45); z-index: 60; display: grid; place-items: center; padding: 16px; }
.modal[hidden] { display: none; }
.mbox { background: var(--surface); border-radius: 12px; width: min(440px, 100%); max-height: 90vh; overflow: auto; box-shadow: 0 20px 60px rgba(11, 27, 51, .25); }
.mhead { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px 12px var(--pad); border-bottom: 1px solid var(--line-2); }
.mhead .iconbtn { border: 0; width: 30px; height: 30px; }
.mhead .iconbtn svg { width: 14px; height: 14px; }
.qrbox { padding: 20px var(--pad); display: grid; gap: 12px; justify-items: center; text-align: center; }
.qrbox .qr { width: 220px; height: 220px; border-radius: 8px; border: 1px solid var(--line); }
.qrbox .mono { word-break: break-all; font-size: 12.5px; }
.qrbox p { margin: 0; }

/* bottom nav (mobile) */
.bnav { display: none; }
@media (max-width: 720px) {
  .bnav { display: grid; grid-template-columns: repeat(5, 1fr); position: sticky; bottom: 0; z-index: 40; background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
  .bnav a { display: grid; justify-items: center; gap: 3px; padding: 8px 0 7px; color: var(--muted); font-size: 11px; font-weight: 550; }
  .bnav a svg { width: 21px; height: 21px; }
  .bnav a:hover { text-decoration: none; }
  .bnav a.on { color: var(--accent); }
  .lr > .x { display: block; }
  .lr > .d { display: none !important; }
  .mo { display: inline-flex; }
  .addnet-top, .top kbd { display: none; }
  .stats.s4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats.s4 .stat:nth-child(2) { border-right: 0; }
  .stats.s4 .stat:nth-child(3) { border-right: 1px solid var(--line-2); }
  .mono.h { font-size: 15px; }
  .foot { margin-bottom: 0; }
  .qrbox .qr { width: 200px; height: 200px; }
  .lr.hr > .m3, .lr.hr > .m4 { font-size: 12.5px; }
  .ph .ttl .sub .addr.lv { max-width: 100%; }
}
@media (max-width: 1080px) { .addnet-top { display: none; } }

@media (max-width: 720px) {
  .sec > header .end .pager, .sec > header .meta { display: none; }
  .sec > footer .pager { margin-left: auto; }
}

/* wallet: connect button, account chip, account menu (popover on desktop, bottom sheet on mobile) */
.wbox { display: flex; align-items: center; flex: none; }
.wconnect svg { width: 15px; height: 15px; }
.wchip { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 10px 0 6px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--text); cursor: pointer; position: relative; white-space: nowrap; }
.wchip:hover { background: var(--surface-2); }
.wchip[aria-expanded="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-2); }
.wchip .idn { width: 20px; height: 20px; border-radius: 50%; }
.wchip .mono { font-size: 12.5px; font-weight: 550; }
.wchip .wdot { position: absolute; top: -2px; right: -2px; width: 10px; height: 10px; border-radius: 50%; background: var(--warn); border: 2px solid var(--surface); }
.wmenu { position: fixed; top: 62px; right: max(24px, calc((100vw - var(--max)) / 2 + 24px)); z-index: 45; }
.wmenu[hidden] { display: none; }
.wsheet { width: 340px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 16px 48px rgba(11, 27, 51, .18); padding: 14px; display: grid; gap: 12px; }
.whead { display: flex; align-items: center; gap: 12px; min-width: 0; }
.whead .idn.lg { border-radius: 50%; }
.whead .t { flex: 1; min-width: 0; }
.whead .iconbtn { border: 0; width: 30px; height: 30px; }
.whead .iconbtn svg { width: 14px; height: 14px; }
.whead .net { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13.5px; }
.whead .net .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 20%, transparent); }
.whead .net.warn { color: var(--warn); } .whead .net.warn .dot { background: var(--warn); box-shadow: 0 0 0 3px color-mix(in srgb, var(--warn) 20%, transparent); }
.waddr { display: flex; align-items: flex-start; gap: 6px; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 8px 8px 8px 10px; }
.waddr .mono { flex: 1; min-width: 0; word-break: break-all; line-height: 1.5; }
.wbal .k { font-size: 12px; color: var(--muted); font-weight: 500; }
.wbal .v { font-size: 22px; font-weight: 680; letter-spacing: -.02em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.wbal .v small { font-size: 13px; color: var(--muted); font-weight: 550; letter-spacing: 0; }
.wwarn { display: grid; gap: 8px; padding: 10px; border-radius: var(--r-sm); background: var(--warn-bg); color: var(--warn); font-size: 13px; }
.wwarn .btn { justify-self: start; }
.wlinks { display: grid; border: 1px solid var(--line-2); border-radius: var(--r-sm); overflow: hidden; }
.wlink { display: flex; align-items: center; gap: 10px; padding: 10px; color: var(--text); border-bottom: 1px solid var(--line-2); min-width: 0; }
.wlink:last-child { border-bottom: 0; }
.wlink:hover { background: var(--surface-2); text-decoration: none; color: var(--text); }
.wlink .t { flex: 1; display: grid; min-width: 0; }
.wlink .t > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wlink b { font-weight: 600; }
.wlink .idn { width: 26px; height: 26px; border-radius: 7px; }
.wlink .chev, .witem .chev { width: 14px; height: 14px; color: var(--faint); flex: none; }
.wrow { padding: 10px; border-bottom: 1px solid var(--line-2); }
.wico { width: 26px; height: 26px; border-radius: 7px; background: var(--accent-2); color: var(--accent-ink); display: inline-grid; place-items: center; flex: none; }
.wico svg { width: 15px; height: 15px; }
.btn.wide { width: 100%; justify-content: center; height: 38px; }
.wdisc { color: var(--bad); }
.wdisc:hover { color: var(--bad); background: var(--bad-bg); }
.wlist { display: grid; gap: 8px; padding: var(--pad); }
.witem { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); cursor: pointer; font-weight: 600; text-align: left; }
.witem:hover { border-color: var(--accent); background: var(--surface-2); }
.witem > span:not(.wico) { flex: 1; }
.witem img { width: 28px; height: 28px; border-radius: 7px; flex: none; }
.witem .wico { width: 28px; height: 28px; }
.wnote { margin: 0; padding: 0 var(--pad) var(--pad); }
.wpick { display: grid; gap: 12px; }
.wpick p { margin: 0; }
@media (max-width: 720px) {
  .wchip { height: 32px; padding: 0 9px 0 5px; gap: 6px; }
  .wchip .mono { font-size: 12px; }
  .wconnect { height: 32px; }
  .wmenu { position: fixed; inset: 0; top: 0; right: 0; background: rgba(11, 27, 51, .45); display: flex; align-items: flex-end; z-index: 70; }
  .wsheet { width: 100%; border-radius: 16px 16px 0 0; border: 0; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); max-height: 88vh; overflow: auto; animation: wup .18s ease-out; }
  .wlink { padding: 12px 10px; }
  .btn.wide { height: 44px; font-size: 14.5px; }
  .top.searching .wbox { visibility: hidden; }
  body.wopen { overflow: hidden; }
}
@keyframes wup { from { transform: translateY(24px); opacity: .6; } to { transform: none; opacity: 1; } }
.mbox .body { padding: var(--pad); }
