/* market-floor.css — the Market (market.html) on the v2 house style, data first. Loads after ui-v2.css.
   Order of the page: the sales tape, what has been burned, packs opened, the economy, the floor (index + movers),
   the biggest sales ever, and everything for sale. A card opens its terminal; Buy opens a checkout. */

.mkt { max-width: 1320px; margin: 0 auto; padding: 14px var(--pad) 48px; display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(28px, 5vh, 54px); }
.mkt-head { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.mkt-head h1 { margin: 0; font: 900 clamp(30px, 4vw, 52px)/1 var(--display); letter-spacing: .03em; color: var(--hi); }
.mkt-head .v2-meta { display: block; margin-top: 6px; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.sec-head > div { display: grid; gap: 6px; min-width: 0; }
.big { font-family: var(--ui); font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.up { color: var(--ok); } .down { color: #ff8a7a; } .flat { color: var(--muted); }
.note { font-size: 12.5px; color: var(--muted); }

/* the sales tape: content doubled, moves exactly half its width, never jumps */
.tape { overflow: hidden; padding: 9px 0; border-block: 1px solid var(--hair); background: rgba(0,0,0,.28);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); }
.tape-track { display: flex; width: max-content; animation: mfTape 80s linear infinite; }
.tape:hover .tape-track { animation-play-state: paused; }
@keyframes mfTape { to { transform: translateX(-50%); } }
.tape-item { display: inline-flex; align-items: center; gap: 9px; padding: 0 22px; font-size: 13px; white-space: nowrap; color: var(--ink-2); }
.tape-item img { width: 22px; height: 22px; object-fit: cover; border-radius: 4px; }
.tape-item b { color: var(--ink); font-weight: 600; }

/* burned forever */
.burn { --c: #ff6a2a; --hi: #ffcf9a; position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); align-items: center;
  gap: clamp(12px, 3vw, 48px); padding: clamp(22px, 4vw, 54px); border-radius: 32px; border: 1px solid rgba(255,140,60,.24);
  background: radial-gradient(70% 90% at 78% 60%, rgba(255,96,24,.3), transparent 62%), linear-gradient(180deg, rgba(44,17,6,.86), rgba(12,6,3,.94));
  box-shadow: 0 40px 100px rgba(0,0,0,.5), 0 0 120px rgba(255,90,20,.12); }
.burn-copy { position: relative; z-index: 1; display: grid; gap: 12px; justify-items: start; min-width: 0; }
.burn-num { margin: 0; font-size: clamp(42px, 7vw, 104px); line-height: .95; max-width: 100%; overflow-wrap: anywhere;
  background: linear-gradient(180deg, #fff 5%, #ffd7a3 45%, #ff6a2a 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 8px 40px rgba(255,90,20,.45)); }
.burn-sub { font-size: clamp(15px, 1.4vw, 19px); color: var(--ink-2); }
.supply { position: relative; width: min(520px, 100%); height: 12px; margin-top: 4px; border-radius: 999px; overflow: hidden;
  background: repeating-linear-gradient(90deg, rgba(255,200,150,.16) 0 2px, transparent 2px 5%), rgba(255,255,255,.06); }
.supply i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: inherit; background: linear-gradient(90deg, #ff3d00, #ffb347); box-shadow: 0 0 16px rgba(255,120,40,.8); transition: width 1.4s var(--ease); }
.burn-stats { display: flex; flex-wrap: wrap; gap: 12px clamp(20px, 3vw, 44px); margin-top: 4px; }
.burn-stats div { display: grid; gap: 3px; }
.burn-stats .big { font-size: clamp(24px, 2.5vw, 36px); line-height: 1; color: #fff3e2; }
.burn-stats span { font-size: 12.5px; color: rgba(255,214,170,.78); }
.burn .note { color: rgba(255,214,170,.66); }
/* where the fees go — the weekly promise under the burn counter */
.burn .fees-note { margin-top: 14px; padding: 12px 16px; border-radius: 14px; font-size: 14px; line-height: 1.5; color: rgba(255,236,205,.86);
  background: linear-gradient(90deg, rgba(231,184,74,.14), rgba(231,184,74,.03)); border: 1px solid rgba(231,184,74,.28); }
.burn .fees-note b { color: #ffe6a3; font-weight: 700; }
.burn .fees-note a { color: #f0cf72; font-weight: 600; white-space: nowrap; }
.pyre { position: relative; height: clamp(230px, 32vw, 380px); display: grid; place-items: center; }
.pyre .fire { position: absolute; width: 80%; aspect-ratio: 1; border-radius: 50%; filter: blur(28px); opacity: .55; animation: v2spin 9s linear infinite;
  background: conic-gradient(#ff3d00, #ffb347, #ff6a2a, #ffd27a, #ff4d10, #ffb347, #ff3d00); }
.pyre .core { position: absolute; width: 56%; aspect-ratio: 1; border-radius: 50%; filter: blur(8px); background: radial-gradient(circle, rgba(255,226,160,.95), rgba(255,110,30,.4) 45%, transparent 70%); }
.pyre .coin { position: relative; width: 46%; animation: v2float 6s ease-in-out infinite; filter: drop-shadow(0 0 34px rgba(255,140,40,.85)) drop-shadow(0 22px 30px rgba(0,0,0,.6)); }

/* packs opened */
.packs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.pk { --c: var(--pc); --hi: var(--ph); display: grid; grid-template-columns: 88px minmax(0, 1fr); align-items: center; gap: 16px; padding: 18px; }
.pk .wrap { width: 88px; rotate: -5deg; transition: transform .5s var(--ease); filter: drop-shadow(0 16px 24px rgba(0,0,0,.55)) drop-shadow(0 0 26px color-mix(in srgb, var(--pc) 45%, transparent)); }
.pk:hover .wrap { transform: translateY(-6px) rotate(9deg); }
.pk-info { display: grid; gap: 7px; min-width: 0; }
.pk-name { font: 900 14px/1 var(--display); letter-spacing: .1em; text-transform: uppercase; color: var(--ph); }
.pk .big { font-size: 32px; line-height: 1; }
.pk .v2-meta b { color: var(--ink); font-weight: 600; }
.pk .v2-bar { display: block; }
.pk .god { font-size: 12.5px; color: var(--ph); }

/* the economy */
.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-radius: var(--radius); border: 1px solid var(--hair); background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02)); }
.kpi + .kpi { border-left: 1px solid var(--hair); }
.kpi { display: grid; align-content: start; gap: 6px; padding: 20px 22px; min-width: 0; }
.kpi > small { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.kpi .big { font-size: clamp(28px, 3vw, 40px); line-height: 1.05; }
.kpi .big .chg { font-size: 15px; letter-spacing: 0; }

/* the floor */
.floor { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 16px; }
.chartcard { display: grid; gap: 12px; padding: clamp(18px, 3vw, 30px); min-width: 0; }
.chart-top { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.idx { font-size: clamp(40px, 5vw, 64px); line-height: 1; }
.chg { font-size: 16px; font-weight: 700; }
svg.chart { display: block; width: 100%; height: clamp(160px, 24vh, 240px); overflow: visible; }
.chart .line { fill: none; stroke: var(--hi); stroke-width: 2.5; vector-effect: non-scaling-stroke; }
.chart .area { fill: url(#mfFill); }
.chart .grid line { stroke: rgba(255,255,255,.06); vector-effect: non-scaling-stroke; }
.chart-empty { display: grid; place-items: center; height: clamp(160px, 24vh, 240px); color: var(--muted); font-size: 14px; text-align: center; }
.chart-foot { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--muted); }
.movers { display: grid; align-content: start; gap: 12px; padding: 18px; min-width: 0; }
.mlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.mlist button { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 12px; width: 100%; padding: 7px 8px; border-radius: 12px; text-align: left; transition: background .2s; }
.mlist button:hover { background: var(--glass); }
.mlist img { width: 38px; height: 38px; object-fit: cover; border-radius: 8px; background: var(--glass); }
.mlist .nm { min-width: 0; }
.mlist .nm b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: 14px; }
.mlist .nm small { font-size: 12px; color: var(--muted); }
.mlist .px { text-align: right; font-variant-numeric: tabular-nums; font-size: 14px; font-weight: 700; }
.mlist-empty { padding: 20px 8px; color: var(--muted); font-size: 14px; }

/* biggest sales ever + the three Gods */
.grails { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 1fr); gap: 18px; overflow-x: auto; padding: 14px 4px 20px; scrollbar-width: none; scroll-snap-type: x proximity; }
.grails::-webkit-scrollbar { display: none; }
.grail { position: relative; display: grid; align-content: start; gap: 10px; min-width: 0; text-align: left; scroll-snap-align: start; }
.grail > span:last-child { display: grid; min-width: 0; }
.grail .v2-tilt { display: block; aspect-ratio: 813 / 1185; border-radius: 10px; }
.grail .v2-tilt > img, .grail .gloss, .grail .v2-foil { border-radius: 10px; }
.grail .no { position: absolute; left: -8px; top: -10px; z-index: 3; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%;
  font-size: 14px; font-weight: 800; color: #160f03; background: linear-gradient(180deg, #fff, var(--hi)); box-shadow: 0 8px 18px rgba(0,0,0,.5); }
.grail .big { font-size: 22px; line-height: 1; }
.grail small { display: block; margin-top: 3px; font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gods3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 6px; }
.godrow { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 20px; min-width: 0; box-shadow: none; }
.godrow img { width: 46px; height: 67px; flex: none; object-fit: cover; border-radius: 5px; box-shadow: 0 0 22px color-mix(in srgb, var(--gc) 55%, transparent); background: #140c06; }
.godrow.sealed img { filter: grayscale(.25) brightness(.5); }
.godrow > div { min-width: 0; }
.godrow b { display: block; font: 900 14px/1.15 var(--display); letter-spacing: .05em; color: var(--gc); }
.godrow small { display: block; font-size: 12.5px; color: var(--muted); }

/* browse */
.bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; }
.search { flex: 1; min-width: 180px; display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 16px; border-radius: 999px; background: var(--glass); border: 1px solid var(--hair); }
.search svg { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--muted); stroke-width: 2; }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--ink); font: 15px var(--ui); }
.search input::placeholder { color: var(--faint); }
.count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; font-size: 11px; font-weight: 700; color: #160f03; background: var(--hi); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips button { flex: none; height: 36px; padding: 0 16px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--muted); background: var(--glass); border: 1px solid var(--hair) !important; }
.chips button.on { color: #160f03; background: var(--hi); border-color: transparent !important; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 18px 14px; }
.tile { display: grid; gap: 6px; text-align: left; min-width: 0; }
.tile .art { position: relative; aspect-ratio: 813 / 1185; border-radius: 8px; overflow: hidden; background: #140c06; box-shadow: 0 12px 24px rgba(0,0,0,.45); transition: transform .35s var(--ease), box-shadow .35s; }
.tile:hover .art { transform: translateY(-4px); box-shadow: 0 18px 34px rgba(0,0,0,.55), 0 0 26px color-mix(in srgb, var(--rc) 45%, transparent); }
.tile .art img { display: block; width: 100%; height: 100%; object-fit: cover; }
.tile .exist { position: absolute; left: 6px; top: 6px; padding: 3px 8px; border-radius: 999px; font-size: 10.5px; font-weight: 700; background: rgba(0,0,0,.74); backdrop-filter: blur(6px); }
.tile .nm { font-size: 12.5px; line-height: 1.25; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile .px { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; font-variant-numeric: tabular-nums; min-width: 0; }
.tile .px b { font-size: 15px; white-space: nowrap; }
.tile .px small { font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.r-common { --rc: var(--r-common); } .r-rare { --rc: var(--r-rare); } .r-super { --rc: var(--r-super); } .r-ultra { --rc: var(--r-ultra); } .r-god { --rc: var(--r-god); }
.empty { grid-column: 1 / -1; padding: 40px 0; text-align: center; color: var(--muted); }
.more { display: flex; justify-content: center; margin-top: 18px; }
.filter-group { display: grid; gap: 8px; margin-bottom: 16px; }
.filter-group > small { font-size: 12.5px; font-weight: 600; color: var(--muted); }

/* the card terminal */
.term { width: min(960px, calc(100vw - 24px)); padding: 28px; }
.term .v2-close { position: absolute; right: 16px; top: 16px; z-index: 2; }
.t-grid { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 30px; }
.t-art { align-self: start; }
.t-card { aspect-ratio: 813 / 1185; border-radius: 14px; }
.t-card > img, .t-card .gloss { border-radius: 14px; }
.t-scarce { margin-top: 14px; text-align: center; font-size: 13px; color: var(--ink-2); }
.t-scarce b { color: var(--hi); }
.t-desc { margin-top: 12px; font-size: 13px; line-height: 1.5; color: var(--muted); white-space: pre-wrap; }
.t-info { display: grid; gap: 14px; min-width: 0; align-content: start; }
.t-info h2 { padding-right: 40px; }
.t-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; }
.t-price .big { font-size: 40px; line-height: 1; }
.t-chartwrap { position: relative; }
.t-chart { display: block; width: 100%; height: 140px; overflow: visible; touch-action: pan-y; }
.t-chart .line { fill: none; stroke: var(--hi); stroke-width: 2.2; vector-effect: non-scaling-stroke; }
.t-chart .area { fill: url(#mfTFill); }
.t-chart .avg { stroke: rgba(255,255,255,.28); stroke-width: 1; stroke-dasharray: 5 4; vector-effect: non-scaling-stroke; }
.t-chart .scrub { stroke: rgba(255,255,255,.4); stroke-width: 1; vector-effect: non-scaling-stroke; }
.t-tip { position: absolute; top: -6px; translate: -50% -100%; padding: 4px 9px; border-radius: 8px; font-size: 12px; font-weight: 700; white-space: nowrap; background: rgba(0,0,0,.84); pointer-events: none; }
.t-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.t-facts div { padding: 10px 12px; border-radius: 14px; background: var(--glass); min-width: 0; }
.t-facts small { display: block; font-size: 12px; color: var(--muted); }
.t-facts b { font-size: 16px; font-weight: 650; font-variant-numeric: tabular-nums; }
.t-list { display: grid; gap: 6px; }
.t-list .row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 8px 8px 8px 14px; border-radius: 14px; background: rgba(255,255,255,.04); }
.t-list .who { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.t-list .who small { margin-left: 6px; font-size: 12px; color: var(--hi); }
.t-list b { font-variant-numeric: tabular-nums; }
.t-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* checkout (same grammar as the Packs checkout) */
.co-scrim { position: fixed; inset: 0; z-index: 70; background: rgba(0,0,0,.62); backdrop-filter: blur(10px); }
.checkout { z-index: 71; }
.co-hero { display: flex; align-items: center; gap: 18px; padding: 22px 24px 16px; border-bottom: 1px solid rgba(255,255,255,.07);
  background: radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--c) 24%, transparent), transparent 60%); }
.co-hero img { width: 54px; aspect-ratio: 813 / 1185; object-fit: cover; border-radius: 5px; filter: drop-shadow(0 10px 18px rgba(0,0,0,.6)); background: #140c06; }
.co-hero div { display: grid; min-width: 0; }
.co-hero b { font: 900 21px/1.15 var(--display); letter-spacing: .03em; color: var(--hi); overflow: hidden; text-overflow: ellipsis; }
.co-hero span { font-size: 13px; color: var(--muted); }
.co-body { padding: 18px 24px 22px; }
.co-lines { display: grid; gap: 9px; margin: 0 0 14px; }
.co-lines div { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--ink-2); }
.co-lines b { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.co-total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.08); }
.co-total span { font-size: 14px; color: var(--ink-2); }
.co-total b { font-size: 30px; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.co-token { text-align: right; font-size: 13px; color: var(--muted); margin-top: 2px; }
.co-info { display: grid; gap: 6px; margin: 16px 0; padding: 12px 14px; border-radius: 14px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.07); font-size: 13px; color: var(--ink-2); }
.co-info b { font-family: var(--mono); font-weight: 600; color: var(--ink); }
.co-info .warn { color: var(--warn); }
.co-note { margin: 0 0 16px; font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.co-actions { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; }
.co-actions > * { min-height: 50px; }
.checkout .co-actions { position: sticky; bottom: 0; padding-top: 10px; background: linear-gradient(180deg, transparent, rgba(16,14,12,.97) 34%); }
.co-pick { display: grid; gap: 10px; margin-bottom: 14px; }
.co-pick button { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; min-height: 60px; padding: 8px 18px; border-radius: 16px; text-align: left; font-size: 16px; font-weight: 650;
  background: var(--glass); border: 1px solid var(--hair) !important; }
.co-pick button.primary { color: #160f03; border-color: transparent !important; background: linear-gradient(180deg, #fffaf0, var(--hi) 42%, color-mix(in srgb, var(--c) 78%, #fff)); }
.co-pick small { display: block; font-size: 12px; font-weight: 500; opacity: .66; }
.co-pick em { font-style: normal; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--glass-2); }
.co-err { margin: 0 0 14px; padding: 12px 14px; border-radius: 14px; font-size: 14px; line-height: 1.45;
  background: color-mix(in srgb, var(--bad) 12%, transparent); border: 1px solid color-mix(in srgb, var(--bad) 32%, transparent); }
.co-err a, .v2-step small a { color: var(--hi); font-family: var(--mono); }
.co-wait { display: grid; justify-items: center; gap: 12px; padding: 22px 0; font-size: 14px; color: var(--ink-2); text-align: center; }
.spinner { width: 40px; height: 40px; border-radius: 50%; border: 3px solid rgba(255,255,255,.12); border-top-color: var(--hi); animation: v2spin 1s linear infinite; }
.co-done { display: grid; gap: 4px; text-align: center; padding: 12px 0 2px; }
.co-done h3 { margin: 0; font: 900 24px/1.15 var(--display); color: var(--hi); }
.co-done p { margin: 0 0 14px; font-size: 14px; color: var(--ink-2); }
.co-body .v2-steps { margin: 4px 0 16px; }

@media (max-width: 1000px) { .floor { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .burn { grid-template-columns: 1fr; text-align: center; padding: 22px 18px 26px; }
  .burn-copy { justify-items: center; } .burn-stats { justify-content: center; }
  .pyre { order: -1; height: 170px; margin-bottom: -10px; }
  .pyre .coin { width: 40%; }
  .packs, .kpis, .gods3 { grid-template-columns: 1fr; }
  .kpi + .kpi { border-left: 0; border-top: 1px solid var(--hair); }
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 10px; }
  .tile .px { flex-direction: column; align-items: flex-start; gap: 0; }
  .term { padding: 22px 16px; }
  .t-grid { grid-template-columns: 1fr; gap: 14px; }
  .t-art { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 14px; align-items: center; width: 100%; padding-right: 40px; }
  .t-art .t-scarce { margin: 0; text-align: left; }
  .t-art .t-desc { grid-column: 1 / -1; margin: 0; }
  .t-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .co-actions { grid-template-columns: 1fr 1.6fr; }
}
@media (orientation: landscape) and (max-height: 500px) {
  .mkt { gap: 24px; padding-top: 8px; }
  .burn { padding: 18px 24px; }
  .burn-num { font-size: 48px; }
  .pyre { height: 58vh; }
  .pk { grid-template-columns: 56px minmax(0, 1fr); gap: 10px; padding: 12px; }
  .pk .wrap { width: 56px; }
  .pk .big { font-size: 24px; }
  .kpi { padding: 14px 16px; }
  svg.chart, .chart-empty { height: 140px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
  .term { padding: 16px 18px; max-height: calc(100dvh - 16px); }
  .t-grid { grid-template-columns: 150px minmax(0, 1fr); gap: 20px; }
  .t-chart { height: 96px; }
  .t-desc { display: none; }
  .v2-modal.checkout { max-height: calc(100dvh - 16px); }
  .co-hero { padding: 12px 18px; } .co-hero img { width: 32px; }
  .co-body { padding: 12px 18px 14px; }
  .co-total b { font-size: 24px; }
  .co-info { margin: 10px 0; }
}
