/* Sixty-Nine Styles. Gallery-wall look: header strip, today's piece large with the auction desk beside it, past pieces as a wall below. */
:root{
  --bg:#e4e6ea; --surface:#f5f6f8; --sunk:#d9dce2; --ink:#15171c; --muted:#5b616d; --line:#c8ccd3;
  --accent:#e8492a; --on-accent:#ffffff; --live:#1d8a5f; --live-bg:#d3eee1; --warn-bg:#fde7e1; --warn-ink:#8f2410;
  --display:"Unbounded","Arial Black",system-ui,sans-serif;
  --body:"Instrument Sans",system-ui,-apple-system,"Segoe UI",sans-serif;
  --mono:"JetBrains Mono",ui-monospace,"SF Mono",Menlo,monospace;
  color-scheme:light;
}
@media (prefers-color-scheme: dark){:root{--bg:#111318;--surface:#1a1d24;--sunk:#0c0e12;--ink:#eef0f4;--muted:#99a0ac;--line:#2b303a;--accent:#ff6b4a;--on-accent:#140a07;--live:#3ecf8e;--live-bg:#123326;--warn-bg:#3a1a12;--warn-ink:#ffb4a1;color-scheme:dark}}
*{box-sizing:border-box}
html{padding-top:env(safe-area-inset-top,0px);padding-bottom:env(safe-area-inset-bottom,0px)}
body{margin:0;background:var(--bg);color:var(--ink);font-family:var(--body);font-size:15px;line-height:1.5;-webkit-text-size-adjust:100%}
[hidden]{display:none!important}
a{color:inherit}
.wrap{max-width:1280px;margin:0 auto;padding-block:20px 40px;padding-left:max(16px,env(safe-area-inset-left,0px));padding-right:max(16px,env(safe-area-inset-right,0px));display:flex;flex-direction:column;gap:24px}
button{font:500 13px/1 var(--body);color:var(--ink);background:var(--surface);border:1px solid var(--line);border-radius:999px;padding:10px 15px;cursor:pointer;white-space:nowrap;touch-action:manipulation}
button:hover:not(:disabled){border-color:var(--muted)}
button:focus-visible,input:focus-visible,.tok:focus-visible,a:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
button.on{background:var(--ink);color:var(--bg);border-color:var(--ink)}
button.primary{background:var(--accent);color:var(--on-accent);border-color:var(--accent)}
button:disabled{opacity:.42;cursor:not-allowed}
.row{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.row.end{justify-content:flex-end}
.lbl{font-family:var(--mono);font-size:11px;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
.mono{font-family:var(--mono);font-variant-numeric:tabular-nums}
.small{font-size:11.5px}
.fine{color:var(--muted);font-size:12.5px;margin:0}
.err{color:var(--accent);font-size:13px;margin:0}

header{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:14px}
.mark{font-family:var(--display);font-weight:700;font-size:clamp(22px,3.4vw,32px);line-height:1;margin:0;letter-spacing:-.01em;text-decoration:none}
.mark span{color:var(--accent)}

.banner{display:flex;flex-wrap:wrap;gap:12px;justify-content:space-between;align-items:center;background:var(--live-bg);color:var(--live);border-radius:8px;padding:12px 16px;font-size:14px}

.stage{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);gap:28px;align-items:start}
@media (max-width:880px){.stage{grid-template-columns:minmax(0,1fr)}}
.art{display:flex;flex-direction:column;gap:12px;min-width:0}
.frame{display:block;aspect-ratio:1;width:100%;max-width:100%;border-radius:4px;overflow:hidden;outline:1px solid var(--line);background:var(--surface);padding:0;border:0;position:relative}
.frame img{width:100%;height:100%;display:block}
button.frame{cursor:zoom-in}
.loading{position:absolute;inset:0;display:grid;place-items:center;color:var(--muted);font-size:13px}
.cap{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;align-items:baseline}
.cap h1{font-family:var(--display);font-weight:500;font-size:clamp(26px,4vw,40px);margin:0;line-height:1.05;text-wrap:balance}
.cap .sub{color:var(--muted);font-size:14px}

.desk{display:flex;flex-direction:column;gap:18px;min-width:0}
.status{display:inline-flex;align-items:center;gap:8px;font:500 12px/1 var(--mono);text-transform:uppercase;letter-spacing:.06em;padding:7px 10px;border-radius:999px;background:var(--live-bg);color:var(--live);align-self:flex-start}
.status i{width:7px;height:7px;border-radius:50%;background:currentColor}
.status.burn{background:var(--accent);color:var(--on-accent)}
.status.ended{background:var(--sunk);color:var(--muted)}
.stats{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.stat{background:var(--surface);border-radius:8px;padding:14px 16px;display:flex;flex-direction:column;gap:6px;min-width:0}
.stat b{font-family:var(--display);font-weight:500;font-size:clamp(19px,2.6vw,26px);line-height:1.1;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.stat small{color:var(--muted);font-size:12px;overflow-wrap:anywhere}

.tl{display:flex;flex-direction:column;gap:6px}
.bar{position:relative;height:14px;background:var(--sunk);border-radius:3px;overflow:hidden}
.bar .win{position:absolute;top:0;bottom:0;background:var(--accent);opacity:.32}
.bar .win.live{opacity:.9}
.bar .done{position:absolute;left:0;top:0;bottom:0;background:var(--ink);opacity:.14}
.bar .now{position:absolute;top:-2px;bottom:-2px;width:2px;background:var(--ink)}
.ticks{position:relative;height:14px;font-family:var(--mono);font-size:10px;color:var(--muted)}
.ticks span{position:absolute;transform:translateX(-50%);white-space:nowrap}
.ticks span:first-child{transform:none}
.legend{display:flex;gap:14px;flex-wrap:wrap;font-size:12px;color:var(--muted)}
.legend em{display:inline-block;width:10px;height:10px;border-radius:2px;background:var(--accent);opacity:.5;margin-right:6px;vertical-align:-1px}

.box{background:var(--surface);border-radius:8px;padding:16px;display:flex;flex-direction:column;gap:12px;min-width:0}
.bidrow{display:flex;gap:8px}
.field{flex:1;display:flex;align-items:center;border:1px solid var(--line);border-radius:999px;background:var(--bg);padding:0 14px;min-width:0}
.field input{flex:1;min-width:0;border:0;background:transparent;color:var(--ink);font:500 16px var(--mono);padding:10px 0;outline:none}
.field span{font:12px var(--mono);color:var(--muted)}

.burnnote{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;align-items:baseline}
.burnnote strong{font-family:var(--mono);font-weight:500;font-size:12px;letter-spacing:.06em;text-transform:uppercase}
.burnnote strong.off{color:var(--muted)}
.burnnote strong.onn{color:var(--accent)}
.colls{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:8px}
.coll{border-radius:8px;padding:12px 14px;display:flex;flex-direction:column;align-items:flex-start;gap:4px;text-align:left;white-space:normal;line-height:1.25}
.coll b{font-size:14px;font-weight:600}
.coll small{color:var(--muted);font-size:12px}
.coll.on small{color:inherit;opacity:.7}

.picker{border:1px solid var(--line);border-radius:8px;padding:12px;display:flex;flex-direction:column;gap:10px;background:var(--bg)}
.pkhead{display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap;font-size:13px}
.pkgrid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;overflow-y:scroll;height:var(--rowh,110px);padding-right:6px;scrollbar-width:thin;scrollbar-color:var(--muted) var(--sunk);overscroll-behavior:contain}
.pkgrid::-webkit-scrollbar{width:8px}
.pkgrid::-webkit-scrollbar-track{background:var(--sunk);border-radius:4px}
.pkgrid::-webkit-scrollbar-thumb{background:var(--muted);border-radius:4px}
.tok{position:relative;display:flex;flex-direction:column;gap:3px;padding:0;border:0;background:none;border-radius:4px;cursor:pointer;font:inherit;color:inherit;text-align:left;min-width:0}
.tok .im{width:100%;aspect-ratio:1;display:block;border-radius:4px;outline:1px solid var(--line);background:var(--sunk);object-fit:cover;image-rendering:pixelated}
.tok.sel .im{outline:3px solid var(--accent);outline-offset:-1px}
.tok .id{font:11px var(--mono);color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tok .tag{position:absolute;top:4px;left:4px;font:500 9px/1 var(--mono);letter-spacing:.05em;text-transform:uppercase;background:#d9f3ff;color:#0b4a66;padding:3px 4px;border-radius:3px}
.tok .chk{position:absolute;top:4px;right:4px;width:18px;height:18px;border-radius:50%;background:var(--accent);color:var(--on-accent);font:600 11px/18px var(--body);text-align:center}
.skel{aspect-ratio:1;border-radius:4px;background:var(--sunk);animation:pulse 1s ease-in-out infinite alternate}
@keyframes pulse{to{opacity:.45}}
.linkbtn{background:none;border:0;padding:0;color:var(--muted);text-decoration:underline;font-size:12px}

.bids{display:flex;flex-direction:column;max-height:260px;overflow-y:auto}
.bids div{display:flex;justify-content:space-between;gap:10px;padding:9px 0;border-bottom:1px solid var(--line);font-size:13px}
.bids div:last-child{border-bottom:0}
.bids .who{font-family:var(--mono);font-size:12px}
.bids .amt{font-family:var(--mono);font-variant-numeric:tabular-nums;white-space:nowrap}
.bids .ref{color:var(--muted);font-size:12px}

h2{font-family:var(--display);font-weight:500;font-size:18px;margin:0}
.past{display:flex;flex-direction:column;gap:14px;margin-top:40px}
.wall{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:14px}
@media (max-width:420px){.wall{grid-template-columns:repeat(2,minmax(0,1fr))}}
.card{display:flex;flex-direction:column;gap:6px;min-width:0;background:none;border:0;padding:0;text-align:left;color:inherit;font:inherit;border-radius:4px;cursor:pointer;white-space:normal;line-height:1.4}
.meta{display:flex;justify-content:space-between;gap:8px;font-size:13px;align-items:baseline}
.meta .n{font-weight:600}
.meta .num{font-family:var(--mono);font-size:11px;color:var(--muted)}
.how{font-size:12px;color:var(--muted)}
.empty{color:var(--muted);font-size:14px;grid-column:1/-1}

.styles-head{display:flex;flex-wrap:wrap;justify-content:space-between;gap:12px;align-items:flex-start;margin-bottom:18px}
.lede{max-width:62ch;font-size:14px}
.fams{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:18px}
.chip b{font-family:var(--mono);font-weight:400;opacity:.65;margin-left:6px}

.foot{display:flex;flex-wrap:wrap;justify-content:space-between;gap:10px;color:var(--muted);font-size:12px;border-top:1px solid var(--line);padding-top:16px;margin-top:24px}
.foot a{font-family:var(--mono)}

dialog{border:1px solid var(--line);border-radius:12px;background:var(--surface);color:var(--ink);padding:0;width:min(460px,calc(100vw - 24px));max-height:calc(100dvh - 24px)}
dialog::backdrop{background:rgba(10,11,14,.6)}
.dlg{display:flex;flex-direction:column;gap:14px;padding:18px}
.dlg.wide{width:auto}
#pieceDlg{width:min(640px,calc(100vw - 24px))}
.dlg-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}
.dlg-head h2{font-size:20px}
.wallets{display:flex;flex-direction:column;gap:8px}
.wallets button{display:flex;align-items:center;gap:12px;padding:12px 14px;border-radius:10px;font-size:14px;justify-content:flex-start;width:100%}
.wallets img{width:26px;height:26px;border-radius:6px}
.wallets .wc{width:26px;height:26px;border-radius:6px;background:#3b99fc;display:grid;place-items:center;color:#fff;font:700 11px var(--body)}
.wallets small{color:var(--muted);font-size:12px;margin-left:auto}
.burnthumbs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.burnthumbs figure{margin:0;display:flex;flex-direction:column;gap:4px}
.burnthumbs img{width:100%;aspect-ratio:1;border-radius:4px;outline:1px solid var(--line);image-rendering:pixelated;background:var(--sunk);object-fit:cover}
.burnthumbs figcaption{font:11px var(--mono);color:var(--muted)}
.warnbox{background:var(--warn-bg);color:var(--warn-ink);border-radius:8px;padding:12px 14px;display:flex;flex-direction:column;gap:6px;font-size:14px}
.warnbox p{margin:0;overflow-wrap:anywhere}
.check{display:flex;gap:10px;align-items:flex-start;font-size:14px;cursor:pointer}
.check input{width:18px;height:18px;margin-top:2px;accent-color:var(--accent);flex:none}
button.danger{background:var(--accent)}

.toast{position:fixed;left:50%;bottom:calc(20px + env(safe-area-inset-bottom,0px));transform:translateX(-50%);background:var(--ink);color:var(--bg);padding:12px 18px;border-radius:999px;font-size:14px;max-width:calc(100vw - 32px);z-index:20;text-align:center}
@media (max-width:480px){
  header nav{width:100%}
  header nav button{flex:1}
  .stats{gap:8px}
  .stat{padding:12px}
  .pkgrid{grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}
}
@media (prefers-reduced-motion: reduce){.skel{animation:none}}
