/* page styles: market.html */
.mk-main{padding:36px 20px 70px}
.mk-cta{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.banner{border-radius:var(--radius-sm);padding:12px 16px;margin-bottom:14px;font-size:14px;border:1px solid #ecd59a;background:#fff3d6}
.mk-filters{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin:8px 0 18px;position:sticky;top:64px;z-index:5;background:var(--bg);padding:8px 0}
.mk-filters input{flex:1 1 260px;width:auto}
.mk-filters select{width:auto;flex:0 0 auto}
.wall>.empty{grid-column:1/-1;padding:30px 0}
@keyframes pulse{70%{box-shadow:0 0 0 8px rgba(47,125,50,0)}100%{box-shadow:0 0 0 0 rgba(47,125,50,0)}}
.wall{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:18px}
.lcard{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;box-shadow:var(--shadow);display:flex;flex-direction:column;transition:transform .25s var(--ease-out),box-shadow .25s}
.lcard:hover{transform:translateY(-3px);box-shadow:var(--shadow-lg)}
.lcard.fresh{animation:drop .7s var(--ease-strike)}
@keyframes drop{from{transform:translateY(-18px) scale(.96);opacity:0}}
.lcard .ph{aspect-ratio:1;background:radial-gradient(circle at 50% 40%,#f6ead8,#e4d2b8);display:grid;place-items:center;cursor:pointer;border:0;padding:0;width:100%}
.lcard .ph img{width:100%;height:100%;object-fit:cover}
.lcard .bd{padding:12px 14px 14px;display:flex;flex-direction:column;gap:6px;flex:1}
.lcard .tt{font-weight:750;line-height:1.3}
.lcard .pr{font-family:var(--serif);font-size:22px;font-weight:800}
.lcard .badges{display:flex;gap:6px;flex-wrap:wrap}
.lcard .acts{display:flex;gap:6px;margin-top:auto}
.lcard.sold .ph{filter:grayscale(.7)}
.lcard .st{font-size:11px;text-transform:uppercase;letter-spacing:.08em;color:var(--ink-3)}
.mine{padding:30px 0}
.mine h2{font-size:24px;margin:18px 0 10px}
.mine-list{display:grid;gap:10px}
.mrow{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius-sm);padding:12px 14px}
.mrow .r{display:flex;gap:6px;flex-wrap:wrap;align-items:center}
.seller{margin-top:18px}
.dlg{border:0;border-radius:18px;padding:24px;width:min(560px,94vw);box-shadow:var(--shadow-lg);background:var(--surface);color:var(--ink)}
.dlg.wide{width:min(860px,96vw)}
.dlg::backdrop{background:rgba(30,20,10,.6)}
.dlg[open]{animation:pop .3s var(--ease-out)}
@keyframes pop{from{transform:translateY(12px) scale(.98);opacity:0}}
.dlg h2{font-size:24px;margin-bottom:10px}
.f2{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:10px}
.cert{border:1px dashed var(--line);border-radius:var(--radius-sm);padding:10px 12px;margin:8px 0}
.cert.req{border-color:var(--copper);background:#fff8ee}
.dlg-btns{display:flex;gap:8px;margin-top:8px}
.vgrid{display:grid;grid-template-columns:1.1fr 1fr;gap:20px}
@media(max-width:700px){.vgrid{grid-template-columns:1fr}}
.gallery{display:grid;gap:8px}
.gallery .main{aspect-ratio:1;border-radius:12px;overflow:hidden;background:#efe3d0;display:grid;place-items:center}
.gallery .main img{width:100%;height:100%;object-fit:contain}
.gallery .thumbs{display:flex;gap:6px}
.gallery .thumbs button{width:54px;height:54px;border-radius:8px;overflow:hidden;border:2px solid transparent;padding:0;background:#efe3d0}
.gallery .thumbs button[aria-pressed=true]{border-color:var(--copper)}
.gallery .thumbs img{width:100%;height:100%;object-fit:cover}
.modrow{display:grid;grid-template-columns:80px 1fr auto;gap:12px;align-items:center;padding:10px 0;border-bottom:1px solid var(--line)}
.modrow img{width:80px;height:80px;object-fit:cover;border-radius:8px}
@media (prefers-reduced-motion:reduce){.lcard.fresh,.dlg[open],.live.on i{animation:none}.lcard:hover{transform:none}}

/* split hero: copy left, live market pulse right */
.mk-hero{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(300px,.75fr);gap:clamp(20px,4vw,48px);align-items:stretch;margin-bottom:22px}
.mk-copy{display:flex;flex-direction:column;justify-content:center;gap:12px}
.mk-copy h1{font-size:clamp(30px,4.4vw,52px);line-height:1.05;letter-spacing:-.01em}
.mk-copy .sub{max-width:62ch;color:var(--ink-2)}
.mk-pulse{background:linear-gradient(160deg,#2b1d12,#1c130c);color:#f3e6d2;border-radius:18px;padding:20px 20px 16px;box-shadow:var(--shadow-lg);display:flex;flex-direction:column;gap:14px;position:relative;overflow:hidden}
.mk-pulse::before{content:"";position:absolute;inset:-40% -20% auto auto;width:70%;aspect-ratio:1;background:radial-gradient(circle,rgba(214,140,70,.28),transparent 65%);pointer-events:none}
.pulse-h{display:flex;justify-content:space-between;align-items:baseline}.pulse-h .serif{font-size:19px;font-weight:700}.mk-pulse .hint{color:#c9b59b}
.pulse-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:0}
.pulse-stats div{background:rgba(255,255,255,.05);border:1px solid rgba(255,255,255,.08);border-radius:12px;padding:10px 12px}
.pulse-stats dt{font-size:11px;letter-spacing:.06em;text-transform:uppercase;color:#c9b59b}
.pulse-stats dd{margin:2px 0 0;font-family:var(--serif);font-size:28px;font-weight:800;color:#fff;font-variant-numeric:tabular-nums}
.ticker{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px;min-height:84px}
.ticker li{display:grid;grid-template-columns:auto minmax(0,1fr) auto auto;gap:8px;align-items:center;font-size:13px;padding:7px 10px;border-radius:10px;background:rgba(255,255,255,.04);animation:tickIn .5s var(--ease-out)}
.ticker li .tt{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ticker li time{color:#a8957c;font-size:12px}.ticker li .pr{font-weight:800;color:#f2c48a}
.ticker li.none{display:block;color:#c9b59b;font-style:italic;background:none;padding:6px 0}
.ticker .k{font-size:10px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;padding:2px 7px;border-radius:99px;background:#3d6b3f;color:#e8f5e4}.ticker .k-sold{background:#7a3d1c;color:#ffe2cc}
@keyframes tickIn{from{opacity:0;transform:translateY(-6px)}}
.pulse-rules{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:6px 14px;font-size:12px;color:#d8c6ad}
.pulse-rules li::before{content:"✓ ";color:#8fd18a;font-weight:800}
@media(max-width:860px){.mk-hero{grid-template-columns:1fr}.pulse-stats dd{font-size:24px}}
/* live pill with count */
.live{display:inline-flex;align-items:center;gap:7px;font-size:12.5px;font-weight:700;color:var(--ink-2);background:var(--surface);border:1px solid var(--line);border-radius:99px;padding:6px 12px 6px 10px;box-shadow:var(--shadow);margin-left:auto}
.live i{width:8px;height:8px;border-radius:50%;background:#9a8a78}
.live b{font-variant-numeric:tabular-nums;background:var(--bg-2);border-radius:99px;padding:1px 8px;min-width:24px;text-align:center}
.live.on{color:var(--ok)}.live.on i{background:var(--ok);box-shadow:0 0 0 0 rgba(47,125,50,.6);animation:pulse 2s infinite}
@media (prefers-reduced-motion:reduce){.live.on i{animation:none}.ticker li{animation:none}.gtile{animation:none!important}}
/* empty state: a wall of empty recesses waiting for coins */
.ghost-wall{grid-column:1/-1;display:grid;grid-template-columns:minmax(300px,.9fr) minmax(0,2fr);gap:22px;align-items:start;margin-top:14px}
.ghosts{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:16px;align-items:start}
.ghosts .gtile{-webkit-mask:linear-gradient(#000,rgba(0,0,0,.55));mask:linear-gradient(#000,rgba(0,0,0,.55))}
.gtile{position:relative;overflow:hidden;aspect-ratio:.82;border-radius:var(--radius);border:1px solid rgba(122,90,60,.16);background:linear-gradient(170deg,#fbf5ea,#efe3cf);box-shadow:0 1px 0 #fff inset,0 10px 22px -12px rgba(90,60,30,.35),0 2px 4px rgba(90,60,30,.08);display:flex;flex-direction:column;align-items:center;padding:16px 14px;gap:8px;animation:ghostIn .8s var(--ease-out) both;animation-delay:var(--d)}
.gtile .gc{width:72%;aspect-ratio:1;border-radius:50%;background:radial-gradient(circle at 50% 40%,#e9dac2,#dcc7a6 68%,#cdb591 71%,#f3e8d6 73%);box-shadow:inset 0 8px 16px rgba(90,60,30,.34),inset 0 -3px 6px rgba(255,255,255,.75),0 1px 0 rgba(255,255,255,.9)}
.gtile .gl{width:80%;height:9px;border-radius:5px;background:rgba(122,90,60,.12)}.gtile .gl.s{width:46%}
@keyframes ghostIn{from{opacity:0;transform:translateY(8px)}}
.ghost-wall .first{order:-1;position:sticky;top:132px;background:var(--surface);border:1px solid var(--line);border-radius:18px;padding:26px 28px;box-shadow:var(--shadow-lg);margin-bottom:4px}
.ghost-wall .first h2{font-size:clamp(24px,3vw,32px);margin:4px 0 6px}.ghost-wall .first p{color:var(--ink-2)}
.how{margin:14px 0 18px;padding-left:20px;display:grid;gap:6px;color:var(--ink-2);font-size:14.5px}
.lcard.sample{position:relative;outline:2px dashed var(--copper);outline-offset:-2px}
.sample-tag{position:absolute;top:10px;left:10px;z-index:1;font-size:11px;font-weight:900;letter-spacing:.16em;color:#fff;background:var(--copper-deep);padding:4px 9px;border-radius:6px}
.lcard.sample .ph{cursor:default}.lcard.sample .ph img{object-fit:contain;padding:12%}
.sample-pr{color:var(--ink-3);font-style:italic}
.linkish{background:none;border:0;color:var(--copper-deep);font-weight:700;text-decoration:underline;cursor:pointer;padding:0}
.comps{padding:34px 0 8px}.comps h2{font-size:26px;margin-bottom:4px}.comps td.num{font-variant-numeric:tabular-nums;font-weight:800}
@media(max-width:1100px){.ghost-wall{grid-template-columns:1fr}.ghost-wall .first{position:static}}
@media(max-width:560px){.ghosts{grid-template-columns:1fr 1fr;gap:12px}.ghosts .gtile:nth-child(n+6){display:none}}

/* reserve the wall while listings load (prevents the footer jumping: CLS) */
.wall.loading{min-height:760px}
@media(max-width:560px){.wall.loading{min-height:900px}}
/* ghost tiles: depth + a slow shimmer sweep, staggered so the wall breathes */
.gtile::after{content:"";position:absolute;inset:-20% -60%;background:linear-gradient(105deg,transparent 40%,rgba(255,255,255,.55) 50%,transparent 60%);transform:translateX(-60%);animation:shimmer 3.6s var(--ease-in-out) infinite;animation-delay:calc(var(--d) * 2)}
@keyframes shimmer{0%,35%{transform:translateX(-60%)}75%,100%{transform:translateX(60%)}}
@media (prefers-reduced-motion:reduce){.gtile::after{animation:none;opacity:0}}
.live.idle b{display:none}
.live .lv-note{font-weight:600;color:var(--ink-3)}
/* v5: mobile filter bar keeps the live pill on the filter row; empty-state card clears the sticky bar */
.ghost-wall .first,#ghostWall,#grid{scroll-margin-top:calc(var(--hdr-h,64px) + var(--mk-bar,60px) + 14px)}
@media(max-width:700px){
  .mk-filters{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto;gap:8px;margin-left:-20px;margin-right:-20px;padding:8px 20px;box-shadow:0 8px 14px -12px rgba(60,40,20,.35)}
  .mk-filters input{grid-column:1/-1;width:100%}
  .mk-filters select{width:100%;min-width:0}
  .live{margin-left:0;padding:6px 10px 6px 9px}
  .live .lv-note{display:none}
}
@media(max-width:399.98px){.live b{display:none}.live{gap:6px}}
/* v7: real coins resting in the empty wall's recesses */
.gtile .gc{position:relative;overflow:hidden}
.gtile .gc picture,.gtile .gc img{display:block;width:100%;height:100%;border-radius:50%}
.gtile .gc img{opacity:.34;mix-blend-mode:multiply;filter:sepia(.25) saturate(.8)}
.lcard.sample .ph picture{display:block;width:100%;height:100%}
.lcard.sample .ph img{filter:drop-shadow(0 12px 18px rgba(60,32,14,.35))}
.lph{display:block;width:72%;aspect-ratio:1;margin:auto}
/*@dark*/
:root[data-theme="dark"] .banner{background:#2b2310}
:root[data-theme="dark"] .lcard .ph{background:radial-gradient(circle at 50% 40%,#2d2211,#3f2f18)}
:root[data-theme="dark"] .dlg::backdrop{background:rgba(30,20,10,0.6)}
:root[data-theme="dark"] .cert.req{background:#22190d}
:root[data-theme="dark"] .gallery .main{background:#332613}
:root[data-theme="dark"] .gallery .thumbs button{background:#332613}
:root[data-theme="dark"] .mk-pulse::before{background:radial-gradient(circle,rgba(214,140,70,0.28),transparent 65%)}
:root[data-theme="dark"] .pulse-stats div{background:rgba(19,19,19,1);border:1px solid rgba(51,51,51,1)}
:root[data-theme="dark"] .ticker li{background:rgba(19,19,19,1)}
:root[data-theme="dark"] .live.on i{background:#2f6b2a;box-shadow:0 0 0 0 rgba(47,125,50,0.6)}
:root[data-theme="dark"] .gtile{border:1px solid rgba(122,90,60,0.16);background:linear-gradient(170deg,#251d0e,#332713);box-shadow:0 1px 0 #ffffff inset,0 10px 22px -12px rgba(90,60,30,0.35),0 2px 4px rgba(90,60,30,0.08)}
:root[data-theme="dark"] .gtile .gc{background:radial-gradient(circle at 50% 40%,#3a2c16,#48371c 68%,#514025 71%,#2f2412 73%);box-shadow:inset 0 8px 16px rgba(90,60,30,0.34),inset 0 -3px 6px rgba(255,255,255,0.75),0 1px 0 rgba(255,255,255,0.9)}
:root[data-theme="dark"] .gtile .gl{background:rgba(122,90,60,0.12)}
:root[data-theme="dark"] .sample-tag{background:#8a4a17}
:root[data-theme="dark"] .gtile::after{background:linear-gradient(105deg,transparent 40%,rgba(19,19,19,1) 50%,transparent 60%)}
@media(max-width:700px){:root[data-theme="dark"] .mk-filters{box-shadow:0 8px 14px -12px rgba(60,40,20,0.35)}}
/*/@dark*/
