/* ia.css — MKT-5b. The information architecture's layout: the global header, the hosted-collection cards, the
   collection page (stats row, tabs, items grid), the piece page, /collections and /activity.
   THE FIRST PAINT IS THE RIGHT VIEW (R6): /js/boot.js (synchronous, in <head>) names the route on <html> before the
   body is parsed, and every view is gated here on html[data-route] / html[data-tab]. The design's own `.page.on`
   switch (app.css) is overridden whenever a route is named; ui.go() keeps writing it, harmlessly. */

html[data-route] .page { display: none !important; }
html[data-route="home"] #page-landing,
html[data-route="collection"] #page-mint,
html[data-route="piece"] #page-piece,
html[data-route="collections"] #page-collections,
html[data-route="activity"] #page-activity { display: block !important; }

html[data-route="collection"] .oo-tabpanel { display: none; }
html[data-tab="items"] #tab-items,
html[data-tab="activity"] #tab-activity,
html[data-tab="about"] #tab-about,
html[data-tab="leaderboard"] #tab-leaderboard { display: block; }
html[data-tab="items"] .oo-tabs [data-tab="items"],
html[data-tab="activity"] .oo-tabs [data-tab="activity"],
html[data-tab="about"] .oo-tabs [data-tab="about"],
html[data-tab="leaderboard"] .oo-tabs [data-tab="leaderboard"] { color: var(--ink); border-bottom-color: var(--gilt); }

/* ------------------------------------------------------------------ the global header (R4, R5) */
/* > 900 px: one row — logo · nav · locale · CONNECT. 481–900 px: two rows — logo · CONNECT, then nav · locale.
   <= 480 px (operator ruling at the STOP): two rows AT MOST — logo · CONNECT, then ONE menu control that opens HOME ·
   COLLECTIONS · ACTIVITY · SUBMIT · locale as an overlay (the header itself never grows a third row). */
.oo-header { display: flex; align-items: center; gap: 28px; padding: 18px 40px; border-bottom: 1px solid var(--line2); position: sticky; top: 0; background: var(--ground); z-index: 40; }
.oo-brand { display: flex; align-items: center; gap: 14px; color: var(--ink); text-decoration: none; flex: 0 0 auto; min-width: 0; }
.oo-brand:hover { color: var(--ink); }
.oo-brand .wordmark { white-space: nowrap; }
.oo-navtoggle { display: none; }
.oo-navpanel { display: flex; align-items: center; gap: 28px; flex: 1 1 auto; min-width: 0; }
.oo-nav { display: flex; align-items: center; gap: 28px; flex: 1 1 auto; min-width: 0; }
.oo-nav .navlink { text-decoration: none; white-space: nowrap; }
.oo-nav .navlink[aria-current="page"] { color: var(--ink); }
.oo-locale { display: flex; align-items: center; flex: 0 0 auto; }
.oo-locale > div { margin-left: 0 !important; }
.oo-wallet { position: relative; flex: 0 0 auto; }
.oo-connect { padding: 10px 18px; font-size: 12px; white-space: nowrap; display: inline-flex; align-items: center; gap: 10px; }
.oo-connect.on { color: var(--ink); background: transparent; border: 1px solid var(--line); }
.oo-connect.on:hover { border-color: var(--muted); background: transparent; }
.oo-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gilt); display: inline-block; flex: none; }
.oo-mark { font-size: 10px; letter-spacing: 0.14em; color: var(--dim); }
.oo-menu { position: absolute; top: calc(100% + 8px); right: 0; min-width: 200px; z-index: 60; background: var(--surface); border: 1px solid var(--line); border-radius: 3px; padding: 6px 0; display: flex; flex-direction: column; box-shadow: 0 18px 40px -20px rgba(0,0,0,0.9); }
.oo-menu[hidden] { display: none !important; }
.oo-menu > * { display: block; padding: 10px 16px; font-size: 13px; letter-spacing: 0.06em; color: var(--muted); background: transparent; border: none; text-align: left; cursor: pointer; font-family: 'Instrument Sans', system-ui, sans-serif; text-decoration: none; }
.oo-menu > *:hover { color: var(--ink); }
@media (max-width: 900px) {
  .oo-header { flex-wrap: wrap; gap: 12px 16px; padding: 14px 16px; }
  .oo-brand { order: 1; }
  .oo-brand .wordmark { font-size: 14px !important; }
  .oo-wallet { order: 2; margin-left: auto; }
  .oo-navpanel { order: 3; flex: 1 0 100%; gap: 16px; }
  .oo-nav { gap: 20px; overflow-x: auto; padding-bottom: 2px; }
  .oo-nav .navlink { font-size: 12px; }
  .oo-connect { padding: 9px 12px; font-size: 11px; }
}
@media (max-width: 480px) {
  .oo-header { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 10px; align-items: center; }
  .oo-brand { grid-row: 1; grid-column: 1; gap: 8px; overflow: hidden; }
  .oo-brand svg { width: 24px; height: auto; flex: none; }
  .oo-brand .wordmark { font-size: 10px !important; letter-spacing: 0.16em; overflow: hidden; text-overflow: clip; }
  .oo-wallet { grid-row: 1; grid-column: 2; margin-left: 0; }
  .oo-connect { padding: 8px 10px; font-size: 10px; gap: 6px; }
  .oo-connect .oo-mark { font-size: 9px; letter-spacing: 0.1em; }
  .oo-navtoggle { display: inline-flex; align-items: center; gap: 8px; grid-row: 2; grid-column: 1 / -1; justify-self: start; background: transparent; border: 1px solid var(--faint); border-radius: 3px; color: var(--muted); padding: 7px 12px; font-family: 'Instrument Sans', system-ui, sans-serif; font-size: 11px; letter-spacing: 0.16em; cursor: pointer; }
  .oo-navtoggle::after { content: '\25BE'; font-size: 9px; color: var(--dim); }
  .oo-navtoggle[aria-expanded="true"] { color: var(--ink); border-color: var(--muted); }
  .oo-navpanel { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: flex-start; gap: 18px; padding: 18px 16px 22px; background: var(--ground); border-bottom: 1px solid var(--line2); box-shadow: 0 18px 40px -20px rgba(0,0,0,0.9); }
  .oo-header.menu-open .oo-navpanel { display: flex; }
  .oo-nav { flex-direction: column; align-items: flex-start; gap: 16px; overflow: visible; }
  .oo-nav .navlink { font-size: 13px; }
}

/* home anchors (/#submit, /#learn …) and the leaderboard land clear of the sticky header */
#hosted, #learn, #goal, #submit, #leaderboard { scroll-margin-top: 88px; }

/* ------------------------------------------------------------------ shared pieces */
.oo-badge { display: inline-block; align-self: flex-start; font-size: 11px; letter-spacing: 0.18em; color: var(--gilt); border: 1px solid var(--line); border-radius: 3px; padding: 5px 10px; text-transform: uppercase; }
.oo-muted { font-size: 14px; line-height: 1.6; color: var(--muted); }
.oo-dim { font-size: 12px; line-height: 1.6; color: var(--dim); }
.oo-section { padding: 56px 100px; border-top: 1px solid var(--line2); }
@media (max-width: 900px) { .oo-section { padding: 36px 16px; } }

/* ------------------------------------------------------------------ hosted-collection cards (home, /collections) */
.oo-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.oo-ccard { display: flex; flex-direction: column; gap: 10px; border: 1px solid var(--line); background: linear-gradient(180deg, #121214 0%, #0D0D0F 100%); border-radius: 3px; padding: 28px; color: var(--ink); }
.oo-ccard:hover { border-color: var(--faint); }
.oo-ccard > a:first-child { align-self: flex-start; }
.oo-ccard img { width: 120px; height: auto; display: block; margin-bottom: 6px; }
/* MKT-5c: ONE box for collection art — the Honorary card's, and the Aries Orbitals cover on the cards and the collection header. */
.oo-ccard .oo-art, .oo-col-head .oo-art { width: 100%; max-width: 220px; aspect-ratio: 1; border: 1px solid var(--line); background: #000; }
.oo-ccard .btn { align-self: flex-start; margin-top: 8px; padding: 11px 20px; font-size: 12px; }
@media (max-width: 420px) { .oo-cards { grid-template-columns: minmax(0, 1fr); } .oo-ccard { padding: 20px; } }

/* ------------------------------------------------------------------ the collection page */
.oo-col-head { display: flex; gap: 32px; align-items: center; flex-wrap: wrap; padding: 44px 56px 28px; }
.oo-col-art { width: 136px; height: auto; aspect-ratio: 220/169; display: block; filter: drop-shadow(0 8px 20px rgba(0,0,0,0.55)); }
.oo-col-id { display: flex; flex-direction: column; gap: 10px; min-width: 0; flex: 1 1 320px; }
.oo-links { display: flex; gap: 18px; flex-wrap: wrap; font-size: 12px; letter-spacing: 0.12em; }
.oo-links a { text-decoration: none; }
.oo-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 0; margin: 0 56px; border: 1px solid var(--line); border-radius: 3px; background: var(--surface2); }
.oo-stat { padding: 16px 20px; border-right: 1px solid var(--line2); min-width: 0; }
.oo-stat:last-child { border-right: none; }
.oo-stat-v { font-size: 20px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.oo-stat-k { font-size: 11px; letter-spacing: 0.18em; color: var(--dim); margin-top: 6px; }
.oo-tabs { display: flex; gap: 28px; padding: 24px 56px 0; border-bottom: 1px solid var(--line2); overflow-x: auto; }
.oo-tabs a { font-size: 13px; letter-spacing: 0.14em; color: var(--muted); text-decoration: none; padding: 10px 0 12px; border-bottom: 2px solid transparent; white-space: nowrap; }
.oo-tabs a:hover { color: var(--ink); }
.oo-tabpanel.pad { padding: 32px 56px 72px; }
@media (max-width: 900px) {
  .oo-col-head { padding: 28px 16px 20px; gap: 18px; }
  .oo-col-art { width: 96px; }
  /* MKT-5f (R6): one row that scrolls sideways — the market's four cells join it without growing the row (no jump below). */
  .oo-stats { margin: 0 16px; display: flex; overflow-x: auto; scrollbar-width: none; }
  .oo-stats::-webkit-scrollbar { display: none; }
  .oo-stat { flex: 1 0 152px; padding: 14px 16px; }
  .oo-stat-v { font-size: 18px; }
  .oo-tabs { padding: 16px 16px 0; gap: 20px; }
  .oo-tabpanel.pad { padding: 24px 16px 56px; }
}

/* MKT-5f (R6): THE FONT SWAP AND THE LATE LINKS MUST NOT MOVE THE GRID (T21c's rule, for the collection page). Measured at
   390 px: Instrument Sans arriving shrank the head, the stats row and the tabs by 10 px (line-height: normal follows the
   font's metrics), and the explorer link collection.js adds to #col-links wrapped the row onto a second line (33 px). Every
   line above the grid gets a pixel line-height, and on a narrow screen the links row reserves its second line. */
.oo-col-head .oo-badge { line-height: 16px; }
.oo-col-head .oo-muted { line-height: 22px; }
.oo-links { line-height: 16px; }
.oo-stat-v { line-height: 26px; min-height: 26px; }
.oo-stat-k { line-height: 14px; min-height: 14px; }
.oo-stat[data-stat-pending] .oo-stat-v::before { content: ''; display: block; width: 64px; height: 14px; margin-top: 6px; border-radius: 2px; background: #141417; }
.oo-tabs a { line-height: 18px; }
.oo-header .navlink, .oo-connect, .oo-navtoggle { line-height: 16px; }
@media (max-width: 600px) { #col-links { min-height: 50px; align-content: flex-start; } }

/* MKT-5c: About, editorial — description, facts, traits, holding an Orbital, links, the Honorary panel */
.oo-about { display: flex; flex-direction: column; gap: 40px; padding: 40px 56px 84px; max-width: 980px; }
.oo-about-block { display: flex; flex-direction: column; gap: 12px; }
.oo-about-block > .label { margin-bottom: 4px; }
.oo-about-text { font-size: 15px; line-height: 1.7; color: var(--muted); max-width: 780px; }
.oo-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0; margin: 0; border: 1px solid var(--line); border-radius: 3px; background: var(--surface2); }
.oo-facts > div { padding: 14px 18px; border-bottom: 1px solid var(--line2); border-right: 1px solid var(--line2); min-width: 0; }
.oo-facts dt { font-size: 11px; letter-spacing: 0.18em; color: var(--dim); text-transform: uppercase; }
.oo-facts dd { margin: 6px 0 0; font-size: 15px; color: var(--ink); overflow-wrap: anywhere; }
.oo-facts dd a { text-decoration: none; }
.oo-traitcats { font-size: 15px; line-height: 1.7; letter-spacing: 0.04em; color: var(--ink); }
.oo-about-links { gap: 14px 24px; }
@media (max-width: 900px) { .oo-about { padding: 28px 16px 56px; gap: 32px; } }

/* ------------------------------------------------------------------ MKT-5f: the Items grid (R1, R2, R5, R6)
   The one card: art (square, nothing over it) · #number · alkanes id · the rarity line · the ask line · the action.
   Columns: 2 <= 480 · 3 <= 768 · 4 <= 1280 · 5 <= 1600 · 6 above, never under 180 px a card above 480. The art waits in a
   same-size skeleton (a shimmer), then fades in over 200 ms; with reduced motion nothing shimmers, fades or lifts. */
.oo-items { min-height: 100vh; }
.oo-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace; }
.oo-grid { --cols: 6; --gap: 16px; display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fill, minmax(max(180px, calc((100% - (var(--cols) - 1) * var(--gap)) / var(--cols))), 1fr)); }
@media (max-width: 1600px) { .oo-grid { --cols: 5; } }
@media (max-width: 1280px) { .oo-grid { --cols: 4; } }
@media (max-width: 768px) { .oo-grid { --cols: 3; --gap: 12px; } }
@media (max-width: 480px) {
  .oo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); --gap: 10px; }
  /* two narrow columns: the tier and the rank on their own lines (both reserved, so every card is the same height) */
  .oo-item-tier { flex-wrap: wrap; min-height: 36px; align-content: flex-start; }
  .oo-item-tier .oo-sep { display: none; }
  .oo-item-tier .oo-rank-l { flex-basis: 100%; }
}
.oo-item { position: relative; display: flex; flex-direction: column; border: 1px solid var(--line); background: var(--surface2); border-radius: 4px; min-width: 0; transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease; }
.oo-item:hover { transform: translateY(-2px); border-color: rgba(200,162,75,0.55); box-shadow: 0 10px 28px -18px rgba(200,162,75,0.55), 0 0 0 1px rgba(200,162,75,0.18); }
.oo-item-a { display: flex; flex-direction: column; gap: 6px; padding: 10px 10px 0; color: var(--ink); text-decoration: none; border-radius: 4px 4px 0 0; outline: none; }
.oo-item-a:focus-visible { box-shadow: inset 0 0 0 2px var(--gilt); }
.oo-item-art { position: relative; display: block; aspect-ratio: 1; width: 100%; overflow: hidden; border-radius: 2px; background: #111114; }
.oo-item-art::before { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(255,255,255,0) 30%, rgba(255,255,255,0.05) 50%, rgba(255,255,255,0) 70%); background-size: 220% 100%; animation: oo-shimmer 1.4s linear infinite; }
.oo-item-art img { position: relative; display: block; width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; background: #000; opacity: 0; transition: opacity 0.2s ease; }
.oo-item-art img[data-art="ok"] { opacity: 1; }
.oo-item-art:has(img[data-art="ok"])::before, .oo-item-art:has(img[data-art="failed"])::before { animation: none; background: none; }
@keyframes oo-shimmer { from { background-position: 120% 0; } to { background-position: -120% 0; } }
.oo-item-n { font-size: 14px; letter-spacing: 0.08em; line-height: 22px; margin-top: 4px; }
.oo-item-id { font-size: 12px; line-height: 18px; min-height: 18px; color: var(--muted); letter-spacing: 0.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.oo-item-tier { display: flex; align-items: center; gap: 0 6px; flex-wrap: nowrap; font-size: 12px; line-height: 18px; min-height: 18px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.oo-item-tier .oo-rank-l { color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.oo-item-tier .oo-sep { color: var(--dim); }
.oo-item-p { font-size: 14px; line-height: 22px; min-height: 22px; padding: 8px 10px 0; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.oo-item-p[data-mk-state="unlisted"] { color: var(--muted); }
.oo-item-act { padding: 8px 10px 10px; min-height: 10px; display: flex; flex-direction: column; gap: 6px; }
.oo-item-act:empty { padding-top: 0; }
.oo-item .btn { padding: 10px 0; font-size: 12px; text-align: center; width: 100%; min-height: 40px; }
.oo-item-act [data-mk="notsent"] { font-size: 12px !important; color: var(--muted); }
/* the tiers (R1): a diamond in its own colour and the label beside it — never colour alone */
.oo-dia { font-size: 11px; line-height: 1; flex: none; }
.oo-dia.t1 { color: var(--gilt); }
.oo-dia.t5 { color: #E8E6E1; }
.oo-dia.t10 { color: #9B7BDB; }
.oo-dia.t25 { color: #3FB8AF; }
.oo-dia.t50 { color: #8A93A3; }
.oo-tier-l { color: var(--ink); }
/* the skeleton the first frame draws (and the grid draws until its view is in) */
/* (a skeleton card is NOT an .oo-item: nothing that counts or reads cards can mistake one for a piece) */
.oo-skel { pointer-events: none; display: flex; flex-direction: column; gap: 8px; padding: 10px; border: 1px solid var(--line); background: var(--surface2); border-radius: 4px; min-width: 0; }
.oo-skel .oo-item-art { margin: 0; }
.oo-skel-t { display: block; height: 12px; width: 60%; border-radius: 2px; background: #141417; margin-top: 8px; }
.oo-skel-t.short { width: 40%; margin-bottom: 64px; }
.oo-skel-bar { height: 44px; }
.oo-skel-line { height: 22px; }

/* the filter bar (R5, R6): sticky under the site header; <= 768 px it is one Filters button and a bottom sheet */
.oo-fbar { position: sticky; top: var(--oo-head-h, 70px); z-index: 30; background: var(--ground); display: flex; align-items: center; min-height: 44px; padding: 10px 0; margin: -10px 0 8px; border-bottom: 1px solid var(--line2); }
.oo-fbar-wide { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 10px; width: 100%; }
.oo-fbar-narrow { display: none; align-items: center; gap: 10px; width: 100%; }
.oo-fbar .chip, .oo-fsheet .chip { background: transparent; color: var(--muted); font-family: 'Instrument Sans', system-ui, sans-serif; min-height: 36px; display: inline-flex; align-items: center; gap: 8px; }
.oo-fbar .chip.on, .oo-fsheet .chip.on { color: var(--gilt); }
.oo-fbar .chip:hover { color: var(--ink); border-color: var(--faint); }
.oo-fbar .chip.on:hover { border-color: var(--gilt); color: var(--gilt); }
.chip:focus-visible, .oo-reset:focus-visible, .oo-fchip:focus-visible, .oo-sortopt:focus-visible, .oo-cat:focus-visible { outline: 2px solid var(--gilt); outline-offset: 2px; }
.oo-opt input:focus-visible { outline: 2px solid var(--gilt); outline-offset: 2px; }
.oo-fbar .chip.ghost { border-color: transparent; color: var(--muted); }
.oo-caret { font-size: 9px; color: var(--dim); }
.oo-fbar .field { width: 180px; padding: 8px 12px; font-size: 13px; min-height: 36px; }
.oo-reset { background: none; border: 0; color: var(--muted); font: inherit; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; cursor: pointer; padding: 8px 4px; min-height: 36px; }
.oo-reset:hover { color: var(--ink); }
.oo-menuwrap { position: relative; }
.oo-pop { position: absolute; top: calc(100% + 8px); left: 0; z-index: 35; min-width: 240px; max-width: min(360px, calc(100vw - 32px)); max-height: min(440px, 70vh); overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 8px; box-shadow: 0 24px 48px -24px rgba(0,0,0,0.95); }
.oo-optlist { display: flex; flex-direction: column; }
.oo-opt { display: flex; align-items: center; gap: 10px; padding: 8px 8px; min-height: 36px; font-size: 14px; color: var(--ink); cursor: pointer; border-radius: 3px; }
.oo-opt:hover { background: var(--surface2); }
.oo-opt input { accent-color: var(--gilt); width: 16px; height: 16px; margin: 0; flex: none; }
.oo-opt-l { flex: 1; min-width: 0; }
.oo-opt-c { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.oo-cat { display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; background: none; border: 0; border-top: 1px solid var(--line2); color: var(--ink); font: inherit; font-size: 14px; padding: 10px 8px; min-height: 40px; cursor: pointer; text-align: left; }
.oo-cat:first-child { border-top: 0; }
.oo-cat::after { content: '+'; color: var(--muted); }
.oo-cat[aria-expanded="true"]::after { content: '\2212'; }
.oo-catvals { display: flex; flex-direction: column; padding: 0 0 6px 6px; }
.oo-sortopt { display: block; width: 100%; text-align: left; background: none; border: 0; color: var(--muted); font: inherit; font-size: 14px; padding: 9px 10px; min-height: 36px; cursor: pointer; border-radius: 3px; }
.oo-sortopt:hover { color: var(--ink); background: var(--surface2); }
.oo-sortopt.on { color: var(--gilt); }
.oo-legend { display: flex; flex-direction: column; gap: 8px; padding: 6px 6px 8px; font-size: 13px; }
.oo-legend-h { font-size: 11px; letter-spacing: 0.18em; color: var(--dim); text-transform: uppercase; }
.oo-legend-r { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.oo-legend-n { color: var(--muted); margin-left: auto; padding-left: 12px; font-variant-numeric: tabular-nums; }
.oo-fchips { display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 10px; }
.oo-fchip { display: inline-flex; align-items: center; gap: 8px; background: var(--surface2); border: 1px solid var(--line); border-radius: 999px; color: var(--ink); font: inherit; font-size: 12px; padding: 6px 10px 6px 12px; min-height: 32px; cursor: pointer; }
.oo-fchip:hover { border-color: var(--gilt); }
.oo-x { color: var(--muted); font-size: 14px; line-height: 1; }
.oo-result { font-size: 13px; line-height: 22px; min-height: 22px; color: var(--muted); margin: 0 0 6px; font-variant-numeric: tabular-nums; }
.oo-result .oo-sep { color: var(--dim); }
.oo-mslot:empty { display: none; }
.oo-market-root { margin: 0 0 16px; }
.oo-feeline { font-size: 13px; line-height: 1.6; color: var(--muted); }
.oo-empty { padding: 48px 0; }
.oo-more { display: flex; gap: 14px; align-items: center; justify-content: center; margin-top: 28px; font-size: 13px; color: var(--muted); }
.oo-more[hidden] { display: none; }
.oo-more .btn { padding: 10px 18px; font-size: 12px; min-height: 40px; }
.oo-sentinel { height: 1px; }
/* the sheet (<= 768 px): the same controls, inline; Done closes it */
.oo-fsheet-bg { position: fixed; inset: 0; z-index: 58; background: rgba(7,7,8,0.72); display: flex; align-items: flex-end; }
.oo-fsheet { width: 100%; max-height: 88vh; max-height: 88dvh; display: flex; flex-direction: column; background: var(--surface); border-top: 1px solid var(--line); border-radius: 12px 12px 0 0; outline: none; animation: oo-sheet-in 0.2s ease-out; }
@keyframes oo-sheet-in { from { transform: translateY(24px); opacity: 0.6; } to { transform: none; opacity: 1; } }
.oo-fsheet-top { display: flex; justify-content: space-between; align-items: center; padding: 16px 16px 8px; }
.oo-fsheet-body { overflow-y: auto; padding: 4px 16px 16px; display: flex; flex-direction: column; gap: 18px; }
.oo-fsheet-body .field { width: 100%; min-height: 44px; }
.oo-fsheet-foot { padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line2); }
.oo-fsheet-foot .btn { width: 100%; min-height: 48px; }
.oo-sheet-sec { display: flex; flex-direction: column; gap: 6px; }
@media (max-width: 768px) {
  .oo-fbar-wide { display: none; }
  .oo-fbar-narrow { display: flex; }
  .oo-fbar .chip, .oo-fsheet .chip, .oo-opt, .oo-sortopt, .oo-cat, .oo-reset, .oo-fchip { min-height: 44px; }
  .oo-fsheet .oo-chips .chip { padding: 0 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .oo-item, .oo-item-art img, .oo-fsheet { transition: none; animation: none; }
  .oo-item:hover { transform: none; }
  .oo-item-art::before { animation: none; }
}

/* activity rows (collection tab, /activity, the piece page) */
.oo-rows { display: flex; flex-direction: column; }
.oo-row { display: grid; grid-template-columns: 110px 90px minmax(0, 1fr) 130px 110px; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line2); font-size: 13px; color: var(--muted); }
.oo-row a { text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 700px) { .oo-row { grid-template-columns: 1fr 1fr; } }

/* ------------------------------------------------------------------ the piece page */
.oo-piece { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; padding: 44px 56px 72px; align-items: start; }
.oo-piece-art { width: 100%; max-width: 640px; aspect-ratio: 1; display: block; background: #000; border: 1px solid var(--line); border-radius: 3px; image-rendering: pixelated; }
.oo-piece-side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.oo-traits { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--line2); padding-top: 14px; }
.oo-trait { display: flex; justify-content: space-between; gap: 16px; font-size: 14px; color: var(--ink); text-decoration: none; padding: 4px 0; border-bottom: 1px dotted transparent; }
a.oo-trait:hover, a.oo-trait:focus-visible { border-bottom-color: var(--gilt); outline: none; }
.oo-trait span { color: var(--dim); } .oo-trait b { font-weight: 500; text-align: right; }
/* MKT-5d: category · value · count — the count after the value, right-aligned, muted */
.oo-trait b { flex: 1; } .oo-trait .oo-trait-c { min-width: 92px; text-align: right; white-space: nowrap; font-size: 13px; }
.oo-piece-id { display: flex; gap: 6px 14px; align-items: baseline; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.oo-piece-id .oo-mono { color: var(--ink); font-size: 14px; }
.oo-piece-id a { color: var(--muted); font-size: 12px; letter-spacing: 0.06em; }
.oo-copy { background: transparent; border: 1px solid var(--line); border-radius: 3px; color: var(--muted); font-family: 'Instrument Sans', system-ui, sans-serif; font-size: 12px; letter-spacing: 0.06em; padding: 4px 10px; cursor: pointer; }
.oo-copy[data-copied] { color: var(--gilt); border-color: var(--gilt); }
.oo-piece-rank { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; font-size: 14px; color: var(--ink); letter-spacing: 0.02em; }
.oo-piece-tier { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; font-size: 13px; }
.oo-status { font-size: 16px; color: var(--ink); }
.oo-actions { display: flex; gap: 12px; flex-wrap: wrap; }
@media (max-width: 900px) { .oo-piece { grid-template-columns: minmax(0, 1fr); gap: 24px; padding: 24px 16px 56px; } }

/* the market's sheet: BUY / LIST / CANCEL opened from anywhere (panel.js) */
.oo-sheet-bg { position: fixed; inset: 0; background: rgba(7,7,8,0.8); display: none; align-items: center; justify-content: center; z-index: 55; }
.oo-sheet-bg.on { display: flex; }
.oo-sheet { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 3px; padding: 32px; width: min(620px, calc(100vw - 32px)); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow-y: auto; }
@media (max-width: 600px) { .oo-sheet { padding: 24px 16px; } }

/* ------------------------------------------------------------------ MKT-5e: the market's stepper (panel.js)
   BUY · LIST · CANCEL as one modal: a numbered track, the step's body, its actions. Opened by a click only.
   <= 600 px: a full-screen sheet. The art keeps the collection's dark ground; nothing animates but the track. */
.oo-step-bg { position: fixed; inset: 0; background: rgba(7,7,8,0.72); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); display: none; align-items: center; justify-content: center; z-index: 56; padding: 16px; }
.oo-step-bg.on { display: flex; }
.oo-step { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 3px; width: min(560px, 100%); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow-y: auto; padding: 28px 32px 32px; outline: none; }
.oo-step-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.oo-step-x { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 3px; background: var(--surface2); color: var(--ink); font-size: 20px; line-height: 1; cursor: pointer; flex: 0 0 auto; }
.oo-step-x:hover, .oo-step-x:focus-visible { border-color: var(--gilt); }
.oo-step-track { list-style: none; display: flex; gap: 6px; margin: 0 0 24px; padding: 0; counter-reset: none; }
.oo-step-track li { flex: 1 1 0; min-width: 0; padding-top: 10px; border-top: 2px solid var(--line); color: var(--dim); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: border-color 0.25s ease, color 0.25s ease; }
.oo-step-track li.done { border-top-color: var(--muted); color: var(--muted); }
.oo-step-track li.on { border-top-color: var(--gilt); color: var(--ink); }
.oo-step-num { font-variant-numeric: tabular-nums; margin-right: 2px; }
.oo-step-err { border: 1px solid var(--line); border-left: 2px solid var(--gilt); background: var(--surface2); padding: 12px 14px; font-size: 14px; line-height: 1.6; color: var(--ink); margin-bottom: 16px; }
.oo-step-body { display: flex; flex-direction: column; gap: 16px; }
.oo-step-head { display: flex; gap: 18px; align-items: center; }
.oo-step-head.big { flex-direction: column; align-items: flex-start; }
.oo-step-art { width: 120px; height: 120px; aspect-ratio: 1; image-rendering: pixelated; background: var(--ground2); border: 1px solid var(--line2); flex: 0 0 auto; }
.oo-step-head.big .oo-step-art { width: min(320px, 100%); height: auto; }
.oo-step-id { min-width: 0; }
.oo-step-name { font-size: 22px; line-height: 1.2; }
.oo-step-meta { font-size: 14px; color: var(--muted); margin-top: 6px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.oo-step-rows { display: flex; flex-direction: column; }
.oo-step-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; border-top: 1px solid var(--line2); padding: 10px 0; font-size: 15px; }
.oo-step-row.total { border-top-color: var(--line); color: var(--ink); }
.oo-step-row.total .oo-step-v { font-size: 17px; }
.oo-step-k { color: var(--muted); font-size: 14px; }
.oo-step-v { text-align: right; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.oo-step-row .field { max-width: 200px; text-align: right; }
.oo-step-note { margin: 0; font-size: 14px; line-height: 1.7; color: var(--muted); }
.oo-step-work { font-size: 14px; line-height: 1.7; color: var(--muted); }
.oo-step-work::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--gilt); margin-right: 10px; vertical-align: middle; animation: oo-step-pulse 1.4s ease-in-out infinite; }
@keyframes oo-step-pulse { 0%, 100% { opacity: 0.25; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .oo-step-work::before { animation: none; } .oo-step-track li { transition: none; } }
.oo-step-yours { font-size: 26px; line-height: 1.25; }
.oo-step-mono { font-variant-numeric: tabular-nums; }
.oo-step-copy { border: 1px solid var(--line); border-radius: 3px; background: var(--surface2); color: var(--muted); font-size: 11px; letter-spacing: 0.12em; padding: 3px 8px; cursor: pointer; margin-left: 6px; }
.oo-step-copy:hover, .oo-step-copy:focus-visible { color: var(--ink); border-color: var(--gilt); }
.oo-step-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.oo-step-actions a.btn { text-decoration: none; }
@media (max-width: 600px) {
  .oo-step-bg { padding: 0; align-items: stretch; }
  .oo-step { width: 100%; max-height: none; height: 100vh; height: 100dvh; border: 0; border-radius: 0; padding: 20px 16px 28px; }
  .oo-step-head:not(.big) .oo-step-art { width: 88px; height: 88px; }
  .oo-step-track li { font-size: 10px; letter-spacing: 0.08em; }
  .oo-step-actions .btn { flex: 1 1 auto; text-align: center; }
}

/* ------------------------------------------------------------------ MKT-5e: About's trait catalogue and its lightbox */
.oo-traitlist { display: flex; flex-direction: column; border-top: 1px solid var(--line2); }
.oo-traitcat { border-bottom: 1px solid var(--line2); }
.oo-traitcat > summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; padding: 12px 0; font-size: 15px; color: var(--ink); }
.oo-traitcat > summary::-webkit-details-marker { display: none; }
.oo-traitcat > summary::after { content: '+'; color: var(--muted); font-size: 16px; }
.oo-traitcat[open] > summary::after { content: '\2212'; }
.oo-traitcat > summary:focus-visible { outline: 1px solid var(--gilt); outline-offset: 2px; }
.oo-traitvals { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px 16px; padding: 0 0 14px; }
.oo-traitval { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; text-align: left; background: none; border: 0; border-bottom: 1px dotted var(--line); color: var(--ink); font: inherit; font-size: 14px; padding: 6px 0; cursor: pointer; }
.oo-traitval:hover, .oo-traitval:focus-visible { border-bottom-color: var(--gilt); outline: none; }
.oo-traitval-c { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.oo-tlb-bg { position: fixed; inset: 0; background: rgba(7,7,8,0.72); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); display: none; align-items: center; justify-content: center; z-index: 57; padding: 16px; }
.oo-tlb-bg.on { display: flex; }
.oo-tlb { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 3px; padding: 28px; width: min(560px, 100%); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow-y: auto; display: flex; flex-direction: column; gap: 10px; outline: none; }
.oo-tlb-x { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 3px; background: var(--surface2); color: var(--ink); font-size: 20px; line-height: 1; cursor: pointer; }
.oo-tlb-x:hover, .oo-tlb-x:focus-visible { border-color: var(--gilt); }
.oo-tlb-art { width: 100%; height: auto; aspect-ratio: 1; image-rendering: pixelated; background: var(--ground2); border: 1px solid var(--line2); margin-top: 26px; }
.oo-tlb-title { font-size: 26px; line-height: 1.2; }
.oo-tlb-meta { font-size: 14px; color: var(--muted); }
.oo-tlb-ex { font-size: 13px; color: var(--muted); }
.oo-tlb-ex a { color: var(--ink); }
/* LEADERBOARD: the one link under the board, and the mint feed strip's host */
.oo-lb-counted { margin-top: 16px; font-size: 14px; }
.oo-lb-counted a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.oo-lb-feed { padding-top: 0 !important; }
.oo-lb-feed:empty { display: none; }
@media (max-width: 600px) { .oo-tlb { padding: 20px 16px; } .oo-traitvals { grid-template-columns: 1fr; } }
