/* Auto Bid's item-first layout, shared across all collectible card surfaces. */
:root{--collectible-surface:color-mix(in srgb,var(--theme-raised) 65%,#000);--collectible-art:radial-gradient(ellipse at 50% 100%,color-mix(in srgb,var(--theme-primary) 3%,transparent),transparent 75%),linear-gradient(180deg,transparent 0%,color-mix(in srgb,var(--theme-header) 65%,#000) 100%)}
html[data-theme] :is(.float-card.catalog-card,.hero-demo-card,.stall-card,.buy-order-card,.sell-inventory-card,.admin-catalog-list>button,.auto-bid-preview){background:var(--collectible-surface);border:1px solid var(--theme-border);border-radius:13px;color:var(--text)}
.collectible-heading{padding:14px 14px 0;min-width:0}
.collectible-heading>span{display:block;font-size:11px;line-height:1.5;color:var(--muted);margin-top:4px}
.collectible-heading :is(.item-name,h2,h3,.hero-demo-name){margin:0;color:var(--text);font-size:15px;font-weight:600;line-height:1.4;letter-spacing:0;overflow-wrap:anywhere}
:is(.item-grid,.home-item-grid)>.catalog-card .collectible-heading .item-name{margin:0;font-size:15px;height:2.8em;min-height:2.8em}
html[data-theme] .catalog-card .float-image,html[data-theme] :is(.hero-demo-image,.stall-card-image,.buy-order-visual,.sell-item-image,.catalog-sell-image){background:var(--collectible-art);border:0;border-bottom:2px solid var(--theme-primary);border-radius:0}
.catalog-card .float-image,.hero-stack .catalog-card .float-image{height:205px}
.catalog-card .float-image>button:first-child{display:flex;align-items:center;justify-content:center;padding:0 14px 24px}
.catalog-card .float-image img{height:185px;max-height:185px;max-width:90%;filter:drop-shadow(0 12px 14px #0004)}
.catalog-card .float-card-info{padding:13px}
.catalog-card-stats>div{min-height:23px;gap:12px}
.catalog-card-stats dt{font-size:12px;color:var(--muted);font-weight:400;letter-spacing:0;text-transform:none}
.catalog-card-stats dd{font-size:13px;color:var(--text);font-weight:600;font-variant-numeric:tabular-nums;line-height:1.5}
.catalog-card-stats .card-sale-price{flex-direction:row-reverse;margin:0 0 12px;min-height:29px}
.catalog-card-stats .card-sale-price dt{font-size:10px;text-align:right}
.catalog-card-stats .card-sale-price dd{font-size:20px;letter-spacing:-.35px;color:var(--text);text-align:left}
.catalog-card-stats .card-rap dd{color:#72dda0}
.catalog-card-stats .demand-tag{padding:0;border:0;background:none;color:var(--muted);font-size:13px;letter-spacing:0;text-transform:none;line-height:1.5}
.catalog-card-stats .demand-amazing{color:#72dda0}
.catalog-card-stats .demand-high{color:#79d6c3}
.catalog-card-stats .demand-normal{color:#91baff}
.catalog-card-stats .demand-low{color:#e8bd75}
.catalog-card-stats .demand-terrible{color:#ef8c99}
html[data-theme] .catalog-card .card-action-tray{background:var(--collectible-surface)}
html[data-theme] .float-card.catalog-card:is(:hover,:has(:focus-visible)){border-color:var(--theme-accent)}
/* The hero cards keep their decorative stacking and disabled controls. */
.hero-demo-card .collectible-heading{padding:12px 12px 0}
.hero-demo-card .hero-demo-name{font-size:13px;min-height:3em;margin:0;line-height:1.5;padding:0}
.hero-demo-image{padding:6px 8px;height:160px}
.hero-demo-content .card-sale-price dd{font-size:19px;color:var(--text)}
.hero-demo-content .catalog-card-stats dt{font-size:10px}
.hero-demo-content .catalog-card-stats .card-sale-price{margin-bottom:8px}
/* Owner-facing listing cards and buy orders use the same image and price order. */
.stall-card .collectible-heading h2,.buy-order-card .collectible-heading h3{min-height:2.8em}.stall-card-image,.buy-order-visual{height:205px}
.stall-card-image>img,.buy-order-visual img{height:185px;width:90%;max-width:90%;margin:0;object-fit:contain;filter:drop-shadow(0 12px 14px #0004)}
.stall-card-content,.buy-order-body{padding:13px;display:flex;flex-direction:column}
.stall-grid{align-items:stretch;grid-auto-rows:1fr}
.stall-grid>.stall-card{display:flex;flex-direction:column;height:100%;box-sizing:border-box}
.stall-grid>.stall-card .collectible-heading h2{height:2.8em;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.stall-grid>.stall-card .stall-card-image{flex-shrink:0}
.stall-grid>.stall-card .stall-card-content{flex:1}
.stall-grid>.stall-card .stall-actions{margin-top:auto;padding-top:19px}
.stall-price,.buy-order-price{flex-direction:row-reverse;margin:0 0 12px;padding:0;border:0;order:-1}
.stall-price strong,.buy-order-price strong{font-size:20px;letter-spacing:-.35px;color:var(--text)}
.stall-price>span,.buy-order-price>span{font-size:10px;color:var(--muted);text-align:right}
.stall-item-stats{font-size:11px}.stall-item-stats>div{margin:7px 0}.stall-item-stats>div:last-child dd{color:var(--text)}
.buy-order-actions{background:transparent;border-color:var(--theme-border)}
/* Compact inventory choices retain their selection and disabled states. */
.sell-inventory-card,.admin-catalog-list>button{position:relative;display:flex;flex-direction:column;overflow:hidden;padding:0;text-align:left}
.sell-inventory-card>strong,.admin-catalog-list>button>strong{order:-2;padding:13px 13px 0;margin:0;height:64px;min-height:64px;overflow:hidden;font-size:12px;line-height:1.4;color:var(--text)}
.sell-card-top{position:absolute;top:73px;left:10px;right:10px;z-index:1}
.sell-item-image,.catalog-sell-image{display:grid;place-items:center;height:145px;min-height:145px;margin:0 0 9px;width:100%;flex:none}
.sell-item-image img,.admin-catalog-list .catalog-sell-image img{width:90%;height:132px;object-fit:contain;margin:0;filter:drop-shadow(0 10px 12px #0004)}
.sell-inventory-card .sell-item-stat,.admin-catalog-list .catalog-sell-value,.admin-catalog-list .catalog-sell-rap{margin:0;padding:4px 13px;font-size:11px}
.sell-inventory-card .sell-item-stat:last-child,.admin-catalog-list .catalog-sell-rap{padding-bottom:13px}
.sell-inventory-card .sell-item-stat b,.catalog-sell-rap b{color:var(--text)}
html[data-theme] .sell-inventory-card.selected,html[data-theme] .admin-catalog-list>button[aria-pressed=true]{border-color:var(--theme-accent);box-shadow:inset 0 0 0 1px var(--theme-accent);background:color-mix(in srgb,var(--theme-accent) 8%,var(--theme-raised))}
html[data-theme] :is(.sell-inventory-card,.admin-catalog-list>button):hover:not(:disabled){border-color:var(--theme-accent)}
@media(max-width:640px){
 .collectible-heading{padding:12px 11px 0}
 :is(.item-grid,.home-item-grid)>.catalog-card .collectible-heading .item-name{font-size:12px}
 .catalog-card .float-image{height:165px}.catalog-card .float-image img{height:145px;max-height:145px}
 .catalog-card .float-card-info{padding:11px}.catalog-card-stats .card-sale-price dd{font-size:18px}
 .hero-demo-card .collectible-heading{padding:9px 8px 0}.hero-demo-card .hero-demo-name{font-size:10px;min-height:4.5em}
 .hero-demo-image{height:102px;padding:6px 4px}.hero-demo-content .card-sale-price dd{font-size:15px}
 .hero-demo-content .catalog-card-stats .card-sale-price{justify-content:flex-end;margin:0}
 .sell-inventory-card>strong,.admin-catalog-list>button>strong{font-size:11px;padding:10px 10px 0}
}
.sell-inventory-card .sell-value b{color:var(--theme-accent)}
.sell-inventory-card>strong{padding-right:38px}
html[data-theme] .sell-inventory-card.selected{background:color-mix(in srgb,var(--theme-accent) 12%,var(--collectible-surface));box-shadow:inset 0 0 0 1px var(--theme-accent)}
html[data-theme] .sell-inventory-card:hover:not(:disabled){transform:none}
.sell-card-listed{position:absolute;right:11px;top:49px;font-size:10px;color:var(--muted)}
.sell-inventory-card .sell-value>span{display:flex;align-items:center;gap:6px}
.sell-card-gem{position:absolute;top:10px;right:10px;display:grid;place-items:center;width:24px;height:24px;font-size:20px;line-height:1}
.collectible-tools{display:flex;align-items:center;gap:8px;margin-top:5px;height:31px}
.item-offer-card-label{margin-left:auto;padding:4px 7px;border:1px solid color-mix(in srgb,var(--theme-accent) 25%,var(--theme-border));border-radius:6px;background:color-mix(in srgb,var(--theme-accent) 7%,var(--theme-surface));color:var(--theme-accent);font-size:10px;font-weight:600;white-space:nowrap}
.catalog-card .collectible-tools>.save-button{position:static;display:grid;place-items:center;width:33px;height:31px;padding:0;border:1px solid var(--theme-border);border-radius:8px;background:var(--theme-surface);color:var(--muted);opacity:1;flex:none;transition:color .16s,border-color .16s,background .16s}
.catalog-card .collectible-tools>.save-button .icon{width:17px;height:17px;fill:none;stroke-width:1.75}
.catalog-card .collectible-tools>.save-button:is(:hover,.saved){color:var(--theme-accent);border-color:var(--theme-accent);background:color-mix(in srgb,var(--theme-accent) 8%,var(--theme-surface))}
.collectible-rare{display:inline-grid;place-items:center;vertical-align:middle;width:29px;height:29px;border:0;border-radius:0;background:none;font-size:20px;line-height:1}
.auto-bid-art{background:var(--collectible-art)}
.auto-bid-current strong{font-size:20px;letter-spacing:-.35px}
@media(max-width:640px){.auto-bid-current strong{font-size:19px}.hero-demo-content .card-sale-price dt{display:block}.hero-demo-content .catalog-card-stats .card-sale-price{justify-content:space-between}.hero-demo-card .collectible-rare{width:21px;height:23px;font-size:15px;border-radius:0}}
@media(prefers-reduced-motion:reduce){.catalog-card .collectible-tools>.save-button{transition:none}}
/* Square image boxes make percentage offsets match the thumbnail's visible bounds. */
:is(.float-image,.hero-demo-image,.stall-card-image,.buy-order-visual,.sell-item-image,.catalog-sell-image,.auto-bid-art)>img,.catalog-card .float-image>button>img{translate:var(--art-x,0%) var(--art-y,0%);aspect-ratio:1;object-fit:contain;height:auto;max-height:none}
.catalog-card .float-image>button>img{width:min(90%,185px);max-width:none}
.hero-demo-image>img{width:min(100%,132px)}
.stall-card-image>img,.buy-order-visual>img,.auto-bid-art>img{width:min(90%,185px);margin:0}
.sell-item-image>img,.admin-catalog-list .catalog-sell-image>img{width:min(90%,132px);height:auto;margin:0}
@media(min-width:641px) and (max-width:1100px){.hero-demo-image>img{width:min(100%,142px)}}
@media(max-width:650px){.auto-bid-art>img{width:100%;height:auto}}
@media(max-width:640px){.catalog-card .float-image>button>img{width:min(90%,145px)}.hero-demo-image>img{width:min(100%,80px)}}

/* A wider marketplace and compact cards keep more listings in view. */
main.market-page{width:calc(100% - 64px);max-width:1800px;margin-inline:auto;padding-inline:0}
.market-page .workspace.filters-open{gap:16px}
.market-page .filters-open .item-grid{grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:14px}
:is(.market-page .item-grid,.home-page .home-item-grid)>.catalog-card .collectible-heading{padding:11px 11px 0}
:is(.market-page .item-grid,.home-page .home-item-grid)>.catalog-card .collectible-heading .item-name{font-size:13px;line-height:1.35;height:2.7em;min-height:2.7em}
:is(.market-page,.home-page) .catalog-card .collectible-tools{margin-top:3px;height:28px}
:is(.market-page,.home-page) .catalog-card .collectible-tools>.save-button{width:30px;height:28px;border-radius:7px}
:is(.market-page,.home-page) .catalog-card .float-image{height:155px}
:is(.market-page,.home-page) .catalog-card .float-image>button>img{width:min(90%,145px)}
:is(.market-page,.home-page) .catalog-card .float-card-info{padding:10px 11px}
:is(.market-page,.home-page) .catalog-card-stats>div{min-height:20px}
:is(.market-page,.home-page) .catalog-card-stats .card-sale-price{min-height:25px;margin-bottom:7px}
:is(.market-page,.home-page) .catalog-card-stats .card-sale-price dd{font-size:18px}
:is(.market-page,.home-page) .catalog-card .collectible-rare{width:25px;height:25px;font-size:18px}
:is(.market-page .item-grid,.home-page .home-item-grid)>.catalog-card .listing-activity{padding-top:3px}
@media(max-width:1100px){
 main.market-page{width:calc(100% - 32px)}
 .market-page .filters-open .item-grid{grid-template-columns:repeat(auto-fill,minmax(190px,1fr))}
}
@media(max-width:760px){
 main.market-page{width:calc(100% - 24px)}
 .market-page .filters-open .item-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
 :is(.market-page .item-grid,.home-page .home-item-grid)>.catalog-card .collectible-heading .item-name{font-size:12px}
 :is(.market-page,.home-page) .catalog-card .float-image{height:145px}
 :is(.market-page,.home-page) .catalog-card .float-image>button>img{width:min(90%,135px)}
 :is(.market-page,.home-page) .catalog-card .presence-tooltip{max-width:140px;white-space:normal}
}
@media(max-width:360px){.market-page .filters-open .item-grid{grid-template-columns:minmax(0,1fr)}}

/* Permanent actions: cards remain stationary and only their border highlights. */
.card-action-reveal,.card-action-clip{display:contents}
html[data-theme] .float-card.catalog-card:has(.card-action-tray),
html[data-theme] .float-card.catalog-card:has(.card-action-tray):is(:hover,:has(:focus-visible)){
 overflow:hidden;transform:none;translate:none;z-index:auto;border-radius:13px;box-shadow:none;transition:none;cursor:pointer
}
html[data-theme] .catalog-card .float-image img,
html[data-theme] .catalog-card:is(:hover,:has(:focus-visible)) .float-image img{transform:none;transition:none}
html[data-theme] .catalog-card .card-action-tray{
 position:static;display:grid;grid-template-columns:34px minmax(0,1fr) minmax(0,1fr);gap:6px;
 margin-top:auto;padding:10px;border:0;border-top:1px solid var(--theme-border);border-radius:0;
 background:var(--collectible-surface);box-shadow:none;transform:none;clip-path:none;opacity:1;visibility:visible;transition:none
}
html[data-theme] .catalog-card .card-action-tray:has(.auction-bid-button){grid-template-columns:minmax(0,1fr) minmax(0,1.2fr)}
html[data-theme] .catalog-card .card-action-tray>button{opacity:1;translate:none;transform:none;grid-column:auto;grid-row:auto;order:0;min-width:0}
html[data-theme] .catalog-card .card-action-tray>button:disabled{opacity:.4;cursor:not-allowed}
@media(max-width:420px){html[data-theme] .catalog-card .card-action-tray{padding:8px 6px;gap:4px;grid-template-columns:28px minmax(0,1fr) minmax(0,1fr)}html[data-theme] .catalog-card .card-action-tray .cart-add{width:28px}html[data-theme] .catalog-card .card-action-tray .button{font-size:10px;padding:6px 3px}}

/* Trade and bargain controls share a compact second action row. */
html[data-theme] .catalog-card.listing-item-offers .card-action-tray{grid-template-columns:36px minmax(0,1fr) 36px minmax(0,1fr);grid-template-rows:36px 36px;gap:6px}
html[data-theme] .catalog-card.listing-item-offers .card-action-tray>.bargain-button:not([data-item-offer]){grid-column:1/3;grid-row:2}
html[data-theme] .catalog-card.listing-item-offers .card-action-tray>[data-item-offer]{grid-column:3/5;grid-row:2}
html[data-theme] .catalog-card.listing-item-offers .card-action-tray>.cart-add{grid-column:1;grid-row:1;width:36px;height:36px;padding:0;display:grid;place-items:center}
html[data-theme] .catalog-card.listing-item-offers .card-action-tray>.buy-button{grid-column:2/5;grid-row:1}
html[data-theme] .catalog-card.listing-item-offers .card-action-tray>.bargain-button{height:36px;min-height:36px;padding:7px 3px;line-height:1.2;white-space:nowrap}

.catalog-card-stats .card-warranty dt{display:flex;align-items:center;gap:5px}
.catalog-card-stats .card-warranty .warranty-icon{width:15px;height:15px;color:var(--theme-accent);stroke-width:1.75}

html[data-theme] .catalog-card .card-action-tray .cart-add>.icon{width:18px;height:18px;margin:0;display:block}
/* A listing without offer options only needs cart and purchase controls. */
html[data-theme] .catalog-card .card-action-tray:has(.buy-button):not(:has(.bargain-button)){grid-template-columns:36px minmax(0,1fr)}
html[data-theme] .catalog-card .card-action-tray:has(.buy-button):not(:has(.bargain-button))>.cart-add{width:36px;padding:0}

/* Card controls stay in the corners; listing badges sit beside the price. */
.catalog-card .collectible-heading{position:relative}
:is(.item-grid,.home-item-grid)>.catalog-card .collectible-heading .item-name{padding-right:38px}
:is(.market-page,.home-page) .catalog-card .collectible-tools,.catalog-card .collectible-tools{position:absolute;top:11px;right:11px;margin:0;height:28px}
html[data-theme] body .catalog-card .save-button{box-shadow:none;filter:none;background:var(--theme-surface)}
html[data-theme] body .catalog-card .save-button.saved{color:var(--theme-accent);border-color:var(--theme-accent);background:var(--theme-surface)}
html[data-theme] body .catalog-card .save-button:focus:not(:focus-visible){outline:none;box-shadow:none}
.catalog-card .float-image{position:relative}
.catalog-card .float-image>.collectible-rare{position:absolute;right:11px;bottom:10px;pointer-events:none}
.catalog-card .catalog-card-stats .card-sale-price{position:relative;gap:0;min-height:46px}
.catalog-card .card-sale-price>dt{position:absolute;width:0;height:0;overflow:hidden}
.catalog-card .catalog-card-stats .card-sale-price>dd{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:6px;width:100%;min-width:0}
.catalog-card .card-price-amount{white-space:nowrap}
.catalog-card .card-price-badges{display:flex;flex-direction:column;align-items:flex-end;gap:4px;flex:none;margin-left:auto}
.catalog-card .card-price-badges>:is(.card-warranty-badge,.item-offer-card-label){display:flex;align-items:center;justify-content:center;gap:4px;margin:0;min-height:21px;padding:3px 5px;border:1px solid color-mix(in srgb,var(--theme-accent) 25%,var(--theme-border));border-radius:5px;background:color-mix(in srgb,var(--theme-accent) 7%,var(--theme-surface));color:var(--theme-accent);font-size:9px;line-height:1.2;font-weight:600;letter-spacing:0;white-space:nowrap}
.catalog-card .card-warranty-badge .warranty-icon{width:12px;height:12px;flex:none}
.catalog-card .card-warranty-badge:hover{border-color:var(--theme-accent)}
@container(max-width:180px){.catalog-card .card-price-badges>:is(.card-warranty-badge,.item-offer-card-label){font-size:8px;padding:3px}.catalog-card .catalog-card-stats .card-sale-price>dd{font-size:16px;gap:4px}}
/* Warranty and price share one centered row. */
.catalog-card .card-price-badges{flex-direction:row;align-items:center;justify-content:center}.catalog-card .card-price-badges>.card-warranty-badge{box-sizing:border-box;min-height:28px;padding:5px 8px;font:inherit;font-size:11px;font-weight:600;border-radius:6px;cursor:pointer}.catalog-card .card-price-badges .warranty-icon{width:14px;height:14px}.catalog-card .card-sale-price .card-price-amount{font-size:22px;line-height:1.25}.catalog-card .catalog-card-stats .card-sale-price{min-height:38px}
@container(max-width:200px){.catalog-card .card-sale-price .card-price-amount{font-size:20px}.catalog-card .card-price-badges>.card-warranty-badge{font-size:10px;padding:5px 6px}}
.catalog-card .catalog-card-stats .card-sale-price{min-height:30px;margin-bottom:6px}
/* Center the two information rows between the image and action bar. */
:is(.item-grid,.home-item-grid)>.catalog-card .float-card-info{padding:12px;justify-content:center}
:is(.item-grid,.home-item-grid)>.catalog-card .listing-activity{padding-top:0;min-height:22px}
.catalog-card .card-price-display{display:inline-flex;align-items:baseline;gap:0;min-width:0;white-space:nowrap;color:var(--text);font-size:22px;font-weight:650;font-variant-numeric:lining-nums proportional-nums;letter-spacing:-.3px;line-height:1.25}
.catalog-card .card-sale-price :is(.card-price-currency,.card-price-amount){font:inherit;letter-spacing:inherit;color:inherit;font-variant-numeric:inherit}
@container(max-width:200px){.catalog-card .card-price-display{font-size:20px}}
@container(max-width:170px){.catalog-card .card-price-display{font-size:18px}}
