@font-face {
  font-family: "EP Terminal";
  src: url("../fonts/ep-terminal.woff2") format("woff2");
  font-display: block;
}

:root {
  --bg: #0a0c0e;
  --fg: #dce9e8;
  --dim: #5d7177;
  --faint: #2a383d;
  --strip: #131b1e;
  --soft: #97aaae;
  --accent: #6cc3cf;
  --accent-hi: #b8ecef;
  --accent-lo: #2b6f8c;
  --ok: #6fd3b8;
  --err: #e0727c;
  --gold: #e8c860;
  --blue: #2f86e6;

  --h: 36px;       /* every control: buttons, inputs, selects, segments */
  --line: 2px;     /* every border and divider */
  --gut: 32px;
  --top: 64px;     /* header and toolbar heights; app.js keeps them measured */
  --toolbar: 68px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--fg);
  font: 16px / 1.5 "EP Terminal", ui-monospace, monospace;
  -webkit-font-smoothing: none;
  padding-bottom: calc(var(--h) + 28px); /* room for the sweep bar */
}
img { image-rendering: pixelated; }
button, input, select { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
button:disabled { cursor: default; opacity: .4; }
a { color: inherit; text-decoration: none; }
h1, h2, p, dl, dd { margin: 0; font-weight: inherit; }
:focus-visible { outline: var(--line) solid var(--accent); outline-offset: 2px; }
.dim { color: var(--dim); }
[hidden] { display: none !important; }
.label, .head { color: var(--dim); font-size: 12px; line-height: 16px; text-transform: uppercase; }

/* ---------- controls ---------- */
.btn, .tool, .seg, .search, .link,
:where(input:not([type=range], [type=checkbox]), select) {
  height: var(--h);
}
.btn, .tool, .link { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 16px; white-space: nowrap; }

.btn { background: var(--accent); color: var(--bg); box-shadow: inset 0 -3px 0 var(--accent-lo); }
.btn:hover:not(:disabled) { background: var(--accent-hi); }
.btn:active:not(:disabled) { box-shadow: inset 0 3px 0 var(--accent-lo); }
.btn.quiet { background: var(--strip); color: var(--fg); box-shadow: inset 0 -3px 0 var(--faint); }
.btn.quiet:hover:not(:disabled) { background: var(--faint); }
.btn.quiet:active:not(:disabled) { box-shadow: inset 0 3px 0 var(--bg); }

.tool { border: var(--line) solid var(--faint); color: var(--soft); }
.tool:hover { border-color: var(--dim); color: var(--fg); }

.link { padding: 0 8px; color: var(--dim); }
.link:hover { color: var(--fg); }

:where(input:not([type=range], [type=checkbox]), select) {
  min-width: 0; padding: 0 12px; border: var(--line) solid var(--faint); border-radius: 0;
  background: var(--bg); outline: none;
}
:where(input:not([type=range], [type=checkbox]), select):hover { border-color: var(--dim); }
:where(input:not([type=range], [type=checkbox]), select):focus { border-color: var(--accent); }
input::placeholder { color: var(--dim); }
select {
  appearance: none; width: 200px; padding-right: 36px; cursor: pointer; color: var(--soft);
  /* a 7×4 pixel chevron */
  background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 7 4' shape-rendering='crispEdges'%3E%3Cpath fill='%235d7177' d='M0 0h7v1H0zM1 1h5v1H1zM2 2h3v1H2zM3 3h1v1H3z'/%3E%3C/svg%3E") right 14px center / 10px 6px no-repeat;
}
select:hover { color: var(--fg); }

.seg { display: inline-flex; border: var(--line) solid var(--faint); }
.seg button { min-width: var(--h); padding: 0 14px; color: var(--dim); }
.seg button + button { border-left: var(--line) solid var(--faint); }
.seg button:hover { color: var(--fg); }
.seg button[aria-pressed=true] { background: var(--strip); color: var(--fg); }

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 32px;
  height: 64px; padding: 0 var(--gut); background: var(--bg); border-bottom: var(--line) solid var(--strip); }
.logo { display: block; width: 178px; height: auto; }
.search { flex: 1; max-width: 480px; display: flex; align-items: center; gap: 12px;
  padding: 0 12px; background: var(--strip); border: var(--line) solid var(--strip); cursor: text; }
.search:focus-within { border-color: var(--accent); }
.search input { flex: 1; height: auto; padding: 0; border: 0; background: none; }
.search input::-webkit-search-cancel-button { display: none; }
.connect { margin-left: auto; }
/* the address and "disconnect" share one cell, so the button keeps its width when they swap */
.connect.on { display: inline-grid; }
.connect.on span { grid-area: 1 / 1; }
.connect.on span + span, .connect.on:is(:hover, :focus-visible) span:first-child { visibility: hidden; }
.connect.on:is(:hover, :focus-visible) span + span { visibility: visible; }

/* ---------- collection hero ---------- */
.banner { height: 224px; display: grid; grid: repeat(4, 56px) / auto-flow 56px; overflow: hidden;
  opacity: .55; -webkit-mask: linear-gradient(#000 30%, transparent); mask: linear-gradient(#000 30%, transparent); }
.banner img { width: 56px; height: 56px; }
.hero-row { position: relative; display: flex; align-items: flex-end; flex-wrap: wrap; gap: 24px 32px; margin-top: -48px; padding: 0 var(--gut); }
.avatar { width: 96px; height: 96px; border: var(--line) solid var(--faint); background: var(--bg); }
.title { display: flex; flex-direction: column; gap: 4px; }
.title h1 { display: flex; align-items: center; gap: 12px; font-size: 32px; line-height: 40px; }
.verified { width: 16px; height: 16px; vertical-align: -2px; }
h1 .verified { width: 24px; height: 24px; }
.name { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.name h1 { margin-right: 12px; }
.sep { width: var(--line); height: 24px; margin-right: 12px; background: var(--faint); }
.icon { display: grid; place-items: center; width: 36px; height: 36px; color: var(--dim); }
.icon:hover { color: var(--fg); }
.icon svg { width: 24px; height: 24px; }

/* "?" after "Elysium mainnet", in the hero and on the mint card; both show one note above the "?" */
.q { display: inline-grid; place-items: center; width: 18px; height: 18px; margin-left: 2px; vertical-align: 1px;
  border: var(--line) solid var(--faint); color: var(--soft); font-size: 12px; line-height: 1; }
.q:hover { color: var(--fg); border-color: var(--accent); }
.mainnet { inset: auto; width: min(360px, calc(100vw - 32px)); margin: 0; padding: 16px;
  background: var(--strip); color: var(--soft); border: var(--line) solid var(--faint); animation: pop .2s steps(2) both; }
.mainnet p { margin-top: 8px; }
.mainnet-links { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 12px; }
.mainnet-links :is(a, button) { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
.mainnet-links :is(a, button):hover { color: var(--accent-hi); }
.stats { display: flex; gap: 16px 40px; flex-wrap: wrap; margin-left: auto; }
.stats div { display: flex; flex-direction: column-reverse; gap: 4px; }
.stats dt { color: var(--dim); font-size: 12px; line-height: 16px; text-transform: uppercase; }
.stats dd { line-height: 24px; }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 32px; margin: 32px var(--gut) 0; border-bottom: var(--line) solid var(--strip); }
.tabs button { height: 48px; margin-bottom: calc(-1 * var(--line)); color: var(--dim); border-bottom: var(--line) solid transparent; }
.tabs button:hover { color: var(--fg); }
.tabs button[aria-selected=true] { color: var(--fg); border-color: var(--accent); }

main { padding: 0 var(--gut); }

.live { color: var(--ok); }
.live::before { content: "● "; }
.live.out { color: var(--dim); }

/* ---------- mint ---------- */
.mint { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px 48px; margin-top: 32px; align-items: start; }
.show-main { display: block; width: 100%; height: auto; aspect-ratio: 1; background: var(--strip); }
.show-thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 8px; }
.show-thumbs button { background: var(--strip); outline: var(--line) solid transparent; }
.show-thumbs button:hover { outline-color: var(--faint); }
.show-thumbs button[aria-pressed=true] { outline-color: var(--accent); }
.show-thumbs img, .fresh-row img { display: block; width: 100%; height: auto; }

.mint-panel h2 { font-size: 24px; line-height: 32px; }
.minted-line { display: flex; align-items: baseline; justify-content: space-between; margin-top: 24px; }
.progress { height: 12px; margin-top: 8px; background: var(--strip); }
.progress span { display: block; width: 0; height: 100%; background: var(--accent); transition: width .9s steps(18); }
@media (prefers-reduced-motion: reduce) { .progress span { transition: none; } }

.stage { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; margin-top: 24px; padding: 16px; border: var(--line) solid var(--strip); }
.stage-info { margin-right: auto; }
.stage-price { font-size: 24px; line-height: 32px; }
.stage .live { font-size: 12px; line-height: 16px; text-transform: uppercase; }
.stepper { display: flex; height: var(--h); border: var(--line) solid var(--faint); }
.stepper button { width: var(--h); color: var(--soft); }
.stepper button:hover:not(:disabled) { color: var(--fg); background: var(--strip); }
.stepper input { width: 48px; height: 100%; padding: 0; border: 0; text-align: center; }
.mint-btn { min-width: 128px; }
.stage-buy { flex: 1 1 344px; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px 16px; }
/* with the line showing, the controls rise to the card's top and the line lands level with "minting now" */
.stage-buy:has(.pay:not([hidden])) { align-self: stretch; align-content: space-between; }
.pay { flex-basis: 100%; text-align: right; font-size: 14px; line-height: 16px; text-transform: uppercase; color: var(--soft); }
.pay span { display: block; }
.pay span + span { font-size: 12px; color: var(--dim); }
.pay.short span:first-child { color: var(--err); }

.fresh { margin-top: 24px; }
.fresh-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); gap: 8px; margin-top: 12px; }
.fresh-row button { background: var(--strip); outline: var(--line) solid transparent; }
.fresh-row button:hover { outline-color: var(--accent); }

.mint-panel > .head { margin-top: 32px; }
.schedule { display: flex; gap: 16px; margin-top: 12px; }
.schedule + .schedule { margin-top: 16px; }
.schedule .dot { flex: none; width: 12px; height: 12px; margin-top: 6px; background: var(--ok); }
.schedule .dot.collab { background: var(--gold); }
.free { margin-left: 8px; padding: 0 6px; background: var(--gold); color: var(--bg); font-size: 12px; text-transform: uppercase; }
.how { margin: 12px 0 0; padding-left: 3ch; color: var(--soft); }
.how li + li { margin-top: 8px; }

.live-head { margin-top: 48px; }

/* ---------- faq ---------- */
.faq { max-width: 800px; padding-top: 16px; }
.faq details { border-bottom: var(--line) solid var(--strip); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; padding: 12px 0; list-style: none; cursor: pointer; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--dim); }
.faq details[open] summary::after { content: "−"; }
.faq summary:hover::after { color: var(--fg); }
.faq p { padding-bottom: 20px; color: var(--soft); overflow-wrap: anywhere; }
.faq p a { color: var(--fg); text-decoration: underline; text-decoration-color: var(--faint); text-underline-offset: 4px; }
.faq p a:hover { color: var(--accent); }

/* ---------- toolbar ---------- */
.toolbar { position: sticky; top: var(--top); z-index: 4; display: flex; align-items: center; flex-wrap: wrap; gap: 12px;
  margin: 0 calc(-1 * var(--gut)); padding: 16px var(--gut); background: var(--bg); }
.filters-toggle[aria-expanded=true] { background: var(--strip); color: var(--fg); }
.filters-toggle::before { content: "≡"; }
.count { margin: 0 auto 0 4px; }

/* ---------- filters + grid ---------- */
.layout { display: flex; gap: 32px; align-items: flex-start; }
.filters { position: sticky; top: calc(var(--top) + var(--toolbar)); flex: 0 0 264px;
  max-height: calc(100vh - var(--top) - var(--toolbar) - var(--h) - 28px); overflow-y: auto;
  display: flex; flex-direction: column; scrollbar-width: thin; scrollbar-color: var(--faint) transparent; }
.layout.no-filters .filters { display: none; }
.group { padding: 16px 0; border-bottom: var(--line) solid var(--strip); }
.group:first-child { padding-top: 0; }
.group summary { display: flex; align-items: center; justify-content: space-between; list-style: none; cursor: pointer; }
.group summary:hover { color: var(--fg); }
.group summary::-webkit-details-marker { display: none; }
.group summary::after { content: "+"; font-size: 16px; }
.group[open] summary::after { content: "−"; }
.group .head { margin-bottom: 12px; }
details.group:not([open]) .head { margin-bottom: 0; }
.range { display: flex; align-items: center; gap: 8px; }
.range input { width: 0; flex: 1; }
.acc-search { width: 100%; margin-bottom: 8px; }
.opts { display: flex; flex-direction: column; }
.opts.scroll { max-height: 288px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--faint) transparent; }
.opt { display: flex; align-items: center; gap: 8px; min-height: 32px; padding-right: 4px; cursor: pointer; color: var(--soft); }
.opt:hover { color: var(--fg); }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt::before { content: "[ ]"; color: var(--dim); }
.opt:has(input:checked) { color: var(--fg); }
.opt:has(input:checked)::before { content: "[x]"; color: var(--accent); }
.opt:has(input:focus-visible) { outline: var(--line) solid var(--accent); }
.opt .n { margin-left: auto; color: var(--dim); }
.reset { align-self: flex-start; height: var(--h); margin-top: 8px; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--faint); }
.reset:hover { color: var(--fg); }
.filters-done { display: none; }

.grid { flex: 1; min-width: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(var(--card), 1fr)); }
.grid.size-s { --card: 128px; gap: 12px; }
.grid.size-m { --card: 176px; }
.grid.size-l { --card: 256px; }
.empty { grid-column: 1 / -1; padding: 48px 0; color: var(--dim); }
.empty :is(a, button) { color: var(--fg); text-decoration: underline; text-underline-offset: 4px; }

.card { position: relative; background: var(--strip); cursor: pointer; outline: var(--line) solid transparent; }
.card:hover { outline-color: var(--faint); }
.card:is(.in-cart, .picked) { outline-color: var(--accent); }
.card.moving img { opacity: .5; }
.card .wait { color: var(--accent); }
.card .art { position: relative; }
.card img { display: block; width: 100%; height: auto; aspect-ratio: 1; }
.card .body { display: flex; flex-direction: column; gap: 4px; padding: 12px; }
.card .line { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.card .line .dim { font-size: 12px; }
.card .last { font-size: 12px; line-height: 16px; color: var(--dim); }
.size-s .card .body { padding: 8px; }
.size-s .card .last { display: none; }
.card .bar { position: absolute; left: 0; right: 0; bottom: 0; display: flex; height: var(--h); visibility: hidden; }
.card:hover .bar, .card:focus-within .bar, .card:is(.in-cart, .picked) .bar { visibility: visible; }
.bar button { background: var(--accent); color: var(--bg); }
.bar :is(.buy, .offer, .list) { flex: 1; }
.bar .add { width: var(--h); border-left: var(--line) solid var(--bg); }
.bar button:hover { background: var(--accent-hi); }
.bar .offer { background: var(--faint); color: var(--fg); }
.bar .offer:hover { background: var(--dim); }
.card:is(.in-cart, .picked) .add { background: var(--fg); }

/* ---------- tables ---------- */
.offer-form { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.offer-price { flex: 1; max-width: 280px; }
.offer-qty { width: 80px; }
.offer-days { width: 136px; }
.table { width: 100%; border-collapse: collapse; margin-top: 16px; }
.table th { height: 36px; padding: 0 16px 0 0; text-align: left; font-weight: inherit; color: var(--dim); font-size: 12px; text-transform: uppercase; }
.table td { height: 56px; padding: 0 16px 0 0; border-top: var(--line) solid var(--strip); white-space: nowrap; }
.table th:first-child, .table td:first-child { padding-left: 12px; }
.table tr.click { cursor: pointer; }
.table tr.click:hover td { background: var(--strip); }
.table .thumb { display: flex; align-items: center; gap: 12px; }
.table .thumb img { width: 32px; height: 32px; }
.ev::before { content: "● "; }
.ev[data-kind=sale]::before { color: var(--ok); }
.ev[data-kind=list]::before { color: var(--accent); }
.ev[data-kind=offer]::before { color: var(--soft); }
.ev:is([data-kind=transfer], [data-kind=mint], [data-kind=delist])::before { color: var(--dim); }
.table a:hover { color: var(--fg); }

/* ---------- holders ---------- */
/* punks and wallet pictures keep whole multiples of their 24 and 5 pixels at both row sizes */
.holders-table { margin-top: 0; --row: 64px; --punk: 48px; --face: 30px; }
.holders-table.compact { --row: 40px; --punk: 24px; --face: 20px; }
.holders-table td { height: var(--row); }
.holders-table :is(th, td):nth-child(2) { width: 24%; padding-right: 0; }
.holders-table :is(th, td):nth-child(3) { padding-left: 16px; }
.holders-table :is(th, td):last-child { padding-right: 12px; text-align: right; }
.holders-table th:nth-child(2) { padding-left: 12px; }
.holder { display: flex; align-items: center; gap: 12px; }
.table a.holder:hover { color: var(--accent); }
.face { flex: none; width: var(--face); height: var(--face); background: var(--strip); }
/* the bar is the wallet's share of the top wallet's punks */
.owned { display: flex; align-items: center; height: calc(var(--row) - var(--line)); padding-left: 12px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent-lo) 40%, transparent) var(--share), transparent 0); }
.holder-punks { display: flex; align-items: center; gap: 8px; color: var(--dim); }
.holder-punks button { flex: none; width: var(--punk); height: var(--punk); outline: var(--line) solid transparent;
  background: var(--strip) 0 calc(var(--at) * -1 * var(--punk)) / 100% auto no-repeat; image-rendering: pixelated; }
.holder-punks button:hover { outline-color: var(--accent); }

/* ---------- sweep bar ---------- */
.sweep { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; display: flex; align-items: center; gap: 16px;
  padding: 12px var(--gut); background: var(--strip); border-top: var(--line) solid var(--faint); }
.sweep-range { display: flex; align-items: center; gap: 12px; height: var(--h); }
.sweep input { width: 200px; accent-color: var(--accent); }
.sweep-n { min-width: 2ch; }
.cart-sum { margin-left: auto; white-space: nowrap; }
.cart-clear { display: inline-flex; align-items: center; height: var(--h); padding: 0 8px; }
.cart-clear:hover { color: var(--fg); }
.cart-buy { min-width: 96px; }
body:has(.pane[data-pane=items][hidden]) :is(.sweep, .sellbar) { display: none; }

/* on the mint tab, the mint card follows to the bottom once it scrolls away */
.mintbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; display: flex; align-items: center; gap: 16px;
  padding: 12px var(--gut); background: var(--strip); border-top: var(--line) solid var(--faint); animation: pop .3s steps(3) both; }
body:not(.mintbar-on) .mintbar, body:has(.pane[data-pane=mint][hidden]) .mintbar { display: none; }
.mintbar-info { margin-right: auto; white-space: nowrap; }
.mintbar .live { margin-left: 12px; font-size: 12px; text-transform: uppercase; }
.mintbar .stepper input { background: var(--strip); }

/* in "mine" the bottom bar sells the picked punks instead */
.sellbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; display: flex; align-items: center; gap: 12px;
  padding: 12px var(--gut); background: var(--strip); border-top: var(--line) solid var(--faint); }
body:not(.selling) .sellbar, .selling .sweep { display: none; }
.sell-n { white-space: nowrap; }
.sell-all { display: inline-flex; align-items: center; height: var(--h); padding: 0 8px; margin-right: auto; }
.sell-all:hover { color: var(--fg); }
.sell-price { width: 200px; }
.sell-days { width: 136px; }

/* ---------- item dialog ---------- */
.item { width: min(1040px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 0; border: var(--line) solid var(--faint);
  background: var(--bg); color: var(--fg); outline: none; }
/* the art is square and sets the dialog's height; the info column scrolls inside it */
.item[open] { display: grid; grid-template-columns: min(50%, calc(100vh - 36px)) 1fr; }
.item::backdrop { background: rgba(4, 8, 10, .82); }
.item-art { position: relative; }
.item-art img { display: block; width: 100%; height: auto; }
.art-tools { position: absolute; top: 8px; right: 8px; display: flex; gap: 4px; }
.art-tools button { display: grid; place-items: center; width: var(--h); height: var(--h); background: var(--bg); color: var(--soft); }
.art-tools button:hover { color: var(--accent); }
.art-tools svg { width: 12px; height: 12px; }
.item-info { contain: size; min-width: 0; padding: 24px 32px 32px; overflow-y: auto; display: flex; flex-direction: column;
  scrollbar-width: thin; scrollbar-color: var(--faint) transparent; }
.item-top { display: flex; align-items: center; justify-content: space-between; height: 24px; }
.item-close { height: var(--h); margin-right: -8px; padding: 0 8px; }
.item-close:hover { color: var(--fg); }
.item-name { margin-top: 8px; font-size: 32px; line-height: 40px; }
.item-owner { margin-top: 4px; }
.box { margin: 24px 0 32px; padding: 16px; border: var(--line) solid var(--strip); }
.item-price-label { font-size: 12px; line-height: 16px; text-transform: uppercase; }
.item-price { margin: 4px 0 16px; font-size: 32px; line-height: 40px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.item-buy { flex: 1; }
.item-form { display: flex; gap: 8px; margin-top: 12px; }
.item-amount { flex: 1; }
.item-days { width: 136px; }
.item-note { margin-top: 12px; font-size: 12px; line-height: 16px; }
.item-note:empty { display: none; }
.item-note .fill { margin-left: 8px; color: var(--fg); text-decoration: underline; text-decoration-color: var(--faint); text-underline-offset: 4px; }
.item-note .fill:hover { color: var(--accent); }
.item-activity a:hover { color: var(--fg); }
.traits { display: grid; grid-template-columns: repeat(auto-fill, minmax(152px, 1fr)); gap: 8px; margin: 12px 0 32px; }
.trait { display: flex; flex-direction: column; gap: 2px; padding: 8px 12px; background: var(--strip); }
.trait .k { font-size: 12px; line-height: 16px; color: var(--dim); text-transform: uppercase; }
.trait .p { font-size: 12px; line-height: 16px; color: var(--accent); }
.item-activity { margin-top: 12px; }
.item-activity .row { display: flex; align-items: center; gap: 16px; height: 40px; border-top: var(--line) solid var(--strip); }
.item-activity .row > :first-child { width: 10ch; }
.item-activity .row > :last-child { margin-left: auto; }

/* ---------- wallet picker ---------- */
.pick { width: min(320px, calc(100vw - 32px)); padding: 24px; border: var(--line) solid var(--faint); background: var(--bg); color: var(--fg); }
.pick::backdrop { background: rgba(4, 8, 10, .82); }
.pick-list { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.minted { padding-inline: 16px; }
.minted-title { font-size: 24px; line-height: 32px; text-align: center; }
.minted-art { position: relative; margin-top: 12px; }
.minted-row { margin-top: 0; }
/* one punk shows at 10× so its pixels stay square, with the buttons on it; several leave them no room, so they sit below */
.minted-art:has(.minted-row > :only-child) { width: 240px; margin-inline: auto; }
.minted-row:has(> :only-child) { grid-template-columns: 240px; }
.minted-art:not(:has(.minted-row > :only-child)) .art-tools { position: static; justify-content: flex-end; margin-top: 8px; }
.confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; }
.paused-note { margin-top: 12px; }

/* ---------- trading not open yet ---------- */
.closed :is(.sweep, .sellbar, .offer-form, .price-filter, .card .price, [data-tab="offers"], [data-status="listed"]) { display: none; }

/* ---------- loading: one wave crossing everything that hasn't come yet ---------- */
.bone { color: transparent; background: linear-gradient(100deg, var(--strip) 40%, #1f2e33 50%, var(--strip) 60%) 0 0 / 200vw 100% fixed;
  animation: shimmer 2.4s linear infinite; }
@keyframes shimmer { to { background-position: 200vw 0; } }
@media (prefers-reduced-motion: reduce) { .bone { animation: none; background: var(--strip); } }
.stats .bone { min-width: 8ch; }
.minted-count.bone { display: inline-block; min-width: 3ch; line-height: 1; }
.show-thumbs .bone { aspect-ratio: 1; }
.item-art img { aspect-ratio: 1; }
.opts .bone { height: 16px; margin: 8px 0; }
.card.ghost { pointer-events: none; }
.ghost .art { aspect-ratio: 1; }
.ghost .line { height: 24px; align-items: center; }
.ghost .line .bone { width: 44%; height: 14px; }
.ghost .line .bone + .bone { width: 22%; }
.ghost .price { width: 60%; height: 14px; }
.table .ghost td { height: 56px; }
.table .ghost .bone { display: block; width: 64%; height: 14px; }

/* ---------- toasts ---------- */
.toasts { position: fixed; right: var(--gut); bottom: calc(var(--h) + 40px); z-index: 10; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.toast { display: flex; align-items: center; min-height: var(--h); max-width: min(560px, calc(100vw - 2 * var(--gut))); padding: 6px 16px; background: var(--strip); border: var(--line) solid var(--faint); animation: pop .3s steps(3) both; }
.toast::before { content: "●"; align-self: flex-start; margin-right: 8px; color: var(--ok); }
.toast.wait::before { color: var(--accent); }
.toast.err::before { color: var(--err); }
.toast :is(a, button) { margin-left: 12px; color: var(--accent); white-space: nowrap; text-decoration: underline; text-underline-offset: 4px; }
@keyframes pop { from { opacity: 0; transform: translateY(8px); } }

@media (max-width: 860px) {
  :root { --gut: 16px; }
  .top { flex-wrap: wrap; gap: 12px 16px; height: auto; padding-block: 12px; }
  .logo { width: 89px; }
  .search { order: 5; flex-basis: 100%; max-width: none; }
  .hero-row { margin-top: -40px; gap: 16px; }
  .avatar { width: 72px; height: 72px; }
  .title h1 { font-size: 24px; line-height: 32px; gap: 8px; }
  h1 .verified { width: 16px; height: 16px; }
  .stats { width: 100%; margin-left: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .tabs { margin-top: 24px; gap: 16px; }
  .mint { grid-template-columns: 1fr; margin-top: 24px; }
  .stage-info, .stage-buy { flex-basis: 100%; }
  .pay { text-align: left; }
  .stepper { flex: none; }
  .mint-btn { flex: 1; }
  .mintbar { gap: 12px; padding: 10px var(--gut); }
  .mintbar-info { display: none; }
  .toolbar { gap: 8px; padding-block: 12px; }
  .count { margin-left: 0; }
  .layout { display: block; }
  .filters { position: fixed; inset: 0; z-index: 8; max-height: none; padding: 16px var(--gut) 88px; background: var(--bg); }
  .layout:not(.mobile-filters) .filters { display: none; }
  .filters-done { display: flex; position: fixed; left: var(--gut); right: var(--gut); bottom: 16px; }
  .grid, .grid.size-s { gap: 12px; }
  .grid.size-m { --card: 140px; }
  .grid.size-l { --card: 100%; }
  .card .body { padding: 8px 10px 10px; }
  .size, .density { display: none; }
  .table { display: block; overflow-x: auto; }
  .holders-table { --row: 48px; --punk: 24px; --face: 20px; }
  .holders-table :is(th, td):nth-child(3) { display: none; }
  .holders-table :is(th, td):nth-child(2) { width: auto; min-width: 72px; }
  .sweep { gap: 12px; padding: 10px var(--gut); }
  .cart-clear, .cart-sum, .sweep-range .dim { display: none; }
  .sellbar { flex-wrap: wrap; gap: 8px; padding: 10px var(--gut); }
  .sell-price { flex: 1; width: auto; }
  /* the sell bar wraps to two rows here */
  body.selling { padding-bottom: calc(2 * var(--h) + 36px); }
  .selling .toasts { bottom: calc(2 * var(--h) + 48px); }
  .sweep-range { flex: 1; }
  .sweep input { flex: 1; width: auto; }
  .item[open] { grid-template-columns: 1fr; overflow-y: auto; }
  .item-info { contain: none; overflow: visible; padding: 16px; }
  .actions { display: grid; grid-template-columns: 1fr 1fr; }
  .item-buy { grid-column: 1 / -1; }
}
