/* The Shady Reseller's auction: a back room, one spotlight, one card. */
.auction-panel {
    --ink: #25252d;
    --room: #1d1726;
    --room-edge: #2b2238;
    --light: #fff4c8;
    --gold: #ffe76b;
    --paper: #fff9e9;
    --hot: #ff7a93;
    --ahead: #7bd88f;
    --mono: ui-monospace, 'SFMono-Regular', 'Cascadia Mono', Menlo, Consolas, monospace;
}
.market-tab-timer { display: inline-flex; align-items: center; gap: 5px; margin-left: 8px; padding: 1px 7px; border: 2px solid var(--ink, #25252d); border-radius: 99px; background: #25252d; color: #fff; font: 800 .7rem/1.4 ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; font-variant-numeric: tabular-nums; }
.market-tab-timer[hidden] { display: none; }
.market-tab-timer::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #ff3d6e; animation: auction-live 1.4s ease-in-out infinite; }
.market-tabs button[aria-selected="true"] .market-tab-timer { background: #fff; color: #25252d; }
@keyframes auction-live { 50% { opacity: .25; } }

.auction-house { display: grid; gap: 22px; }
.auction-loading, .auction-empty { margin: 0; padding: 48px 20px; border: 3px dashed #8c8794; border-radius: 16px; color: #625c6d; text-align: center; font-weight: 800; }

/* The stage: the card under the light, the desk beside it. */
.auction-stage { display: grid; grid-template-columns: minmax(230px, 360px) minmax(0, 1fr); overflow: hidden; border: 3px solid var(--ink); border-radius: 18px; background: var(--room); color: var(--paper); box-shadow: 6px 6px 0 #ff5d8f; }
.auction-spotlight { position: relative; display: grid; place-items: center; min-height: 100%; padding: 42px 28px 48px; overflow: hidden; background:
    radial-gradient(ellipse 62% 48% at 50% 46%, #fff4c866 0%, #f7d77a26 42%, transparent 72%),
    repeating-linear-gradient(90deg, #241c30 0 16px, #1f1829 16px 32px); }
/* The beam falls from above; the floor catches it. */
.auction-spotlight::before { content: ''; position: absolute; inset: -10% 0 0; background: conic-gradient(from 180deg at 50% 0%, transparent 157deg, #fff4c81f 166deg, #fff4c833 180deg, #fff4c81f 194deg, transparent 203deg); pointer-events: none; }
.auction-spotlight::after { content: ''; position: absolute; left: 18%; right: 18%; bottom: 26px; height: 26px; border-radius: 50%; background: radial-gradient(closest-side, #00000080, transparent); pointer-events: none; }
.auction-card { position: relative; z-index: 1; width: min(100%, 250px); transform: rotate(-2deg); filter: drop-shadow(0 22px 20px #000a); animation: auction-float 6s ease-in-out infinite; }
.auction-card .trading-card { width: 100%; }
/* The card is how its details open: it lifts under the pointer to say so. */
.auction-card .card-preview-button, .auction-previous-card .card-preview-button { display: block; width: 100%; padding: 0; border: 0; background: none; box-shadow: none; color: inherit; text-decoration: none; cursor: zoom-in; transition: transform .2s cubic-bezier(.2, .8, .2, 1); }
.auction-card .card-preview-button:hover, .auction-card .card-preview-button:focus-visible { transform: translateY(-5px) scale(1.02); outline: none; }
.auction-card .card-preview-button:focus-visible .trading-card, .auction-previous-card .card-preview-button:focus-visible .trading-card { outline: 3px solid var(--gold); outline-offset: 4px; }
.auction-title a { color: inherit; text-decoration: none; }
.auction-title a:hover, .auction-title a:focus-visible { text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 3px; text-underline-offset: 6px; outline: none; }
@keyframes auction-float { 50% { transform: rotate(-1deg) translateY(-6px); } }

.auction-desk { display: flex; flex-direction: column; gap: 14px; min-width: 0; padding: 30px 30px 28px; border-left: 3px solid var(--ink); background: linear-gradient(180deg, var(--room-edge), var(--room) 60%); }
.auction-lot { margin: 0; color: var(--gold); font-size: .68rem; font-weight: 950; letter-spacing: .16em; text-transform: uppercase; }
.auction-title { margin: -6px 0 0; color: #fff; font-size: clamp(1.6rem, 3.4vw, 2.4rem); font-weight: 1000; line-height: 1.05; overflow-wrap: anywhere; }
.auction-pitch { margin: 0; padding-left: 12px; border-left: 3px solid #ff5d8f; }
.auction-pitch p { margin: 0; color: #e4dbf0; font-size: .95rem; font-style: italic; }
.auction-pitch cite { display: block; margin-top: 3px; color: #a99fb7; font-size: .72rem; font-style: normal; font-weight: 800; }
.auction-pitch a { color: inherit; }

/* The clock: big, steady digits; red once the last hour starts. */
.auction-clock { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 12px 16px; border: 2px solid var(--gold); border-radius: 12px; background: #120e18; box-shadow: inset 0 0 0 3px #000, 0 0 24px #ffe76b1f; }
.auction-clock span { color: #a99fb7; font-size: .7rem; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.auction-clock strong { color: var(--gold); font: 900 clamp(1.7rem, 3.6vw, 2.35rem)/1 var(--mono); font-variant-numeric: tabular-nums; letter-spacing: .04em; text-shadow: 0 0 14px #ffe76b66; }
.auction-clock.is-final-hour { border-color: var(--hot); box-shadow: inset 0 0 0 3px #000, 0 0 26px #ff7a9333; }
.auction-clock.is-final-hour strong { color: var(--hot); text-shadow: 0 0 14px #ff7a9380; animation: auction-live 2s ease-in-out infinite; }
.auction-clock.is-final-minute strong { animation-duration: .8s; }

.auction-quote { display: grid; gap: 2px; padding: 14px 16px; border-radius: 12px; background: #ffffff0d; }
.auction-quote p { margin: 0; }
.auction-quote-label { color: #a99fb7; font-size: .7rem; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.auction-quote-price { color: #cfc6dc; font-weight: 800; }
.auction-quote-price strong { color: #fff; font: 1000 2.6rem/1.05 var(--mono); font-variant-numeric: tabular-nums; }
.auction-quote-meta { color: #cfc6dc; font-size: .85rem; }
.auction-quote-meta a { color: var(--gold); font-weight: 800; }
.auction-quote.is-bumped { animation: auction-bump .7s cubic-bezier(.2, .8, .2, 1); }
@keyframes auction-bump { 0% { box-shadow: 0 0 0 0 #ffe76b99; transform: scale(1); } 30% { transform: scale(1.03); } 100% { box-shadow: 0 0 0 18px #ffe76b00; transform: scale(1); } }
.auction-standing { justify-self: start; margin-top: 8px !important; padding: 3px 10px; border: 2px solid currentColor; border-radius: 99px; font-size: .78rem; font-weight: 900; }
.auction-standing.is-ahead { color: var(--ahead); background: #7bd88f1a; }
.auction-standing.is-behind { color: var(--hot); background: #ff7a931a; }

/* The paddle: an amount, three raises, one button. */
.auction-bid { display: grid; gap: 10px; }
.auction-bid label { color: #a99fb7; font-size: .7rem; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.auction-bid-row { display: flex; align-items: center; gap: 10px; }
.auction-bid-row input { width: min(100%, 170px); padding: 10px 12px; border: 3px solid var(--ink); border-radius: 10px; background: var(--paper); color: var(--ink); font: 900 1.35rem var(--mono); box-shadow: 3px 3px 0 var(--gold); }
.auction-bid-row input:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.auction-bid-row span { color: #cfc6dc; font-weight: 800; }
.auction-raises { display: flex; flex-wrap: wrap; gap: 8px; }
.auction-raises button { padding: 6px 12px; border: 2px solid #cfc6dc; border-radius: 99px; background: transparent; color: #fff; font: 850 .85rem var(--mono); box-shadow: none; cursor: pointer; }
.auction-raises button:hover, .auction-raises button:focus-visible { border-color: var(--gold); color: var(--gold); outline: none; }
.auction-submit { display: inline-flex; justify-content: center; justify-self: start; padding: 13px 26px; border: 3px solid var(--ink); border-radius: 12px; background: var(--gold); color: var(--ink); font-size: 1rem; font-weight: 1000; letter-spacing: .02em; text-decoration: none; box-shadow: 4px 4px 0 #ff5d8f; cursor: pointer; transition: transform .12s ease, box-shadow .12s ease; }
.auction-submit:hover, .auction-submit:focus-visible { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 #ff5d8f; outline: none; }
.auction-submit:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 #ff5d8f; }
.auction-submit:disabled { opacity: .6; cursor: progress; }
.auction-status { min-height: 1.2em; margin: 0; color: var(--gold); font-size: .85rem; font-weight: 800; }
.auction-status:empty { display: none; }

/* The room's memory: who bid what, highest first. */
.auction-bids { padding: 18px 20px; border: 3px solid var(--ink); border-radius: 16px; background: #fffdf7; box-shadow: 4px 4px 0 var(--ink); }
.auction-bids h3 { margin: 0 0 10px; color: var(--ink); font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; }
.auction-bids-empty { margin: 0; color: #625c6d; font-style: italic; }
.auction-bids-list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; counter-reset: bid; }
.auction-bids-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 14px; padding: 8px 12px; border: 2px solid #ece6d8; border-radius: 10px; color: #3a3442; }
.auction-bids-list li.is-leading { border-color: var(--ink); background: var(--gold); color: var(--ink); box-shadow: 3px 3px 0 var(--ink); }
.auction-bids-list li.is-you:not(.is-leading) { border-style: dashed; }
.auction-bidder { display: flex; min-width: 0; font-weight: 800; }
.auction-bids-list strong { font: 900 1rem var(--mono); font-variant-numeric: tabular-nums; }
.auction-bids-list time { color: #7c7684; font-size: .75rem; }
.auction-bids-list li.is-leading time { color: #4a4353; }

/* The last lot, with the stamp it earned. */
.auction-upcoming { display: flex; align-items: center; gap: 18px; margin-bottom: 14px; padding: 14px 18px; border: 3px dashed var(--ink); border-radius: 16px; background: #1f1b2e; color: #f4eff9; }
.auction-upcoming-card { flex: none; width: 84px; aspect-ratio: 5 / 7; }
.auction-upcoming-card .card-back { display: grid; place-content: center; width: 100%; height: 100%; border: 3px solid var(--ink); border-radius: 10px; font-size: .55rem; text-align: center; overflow: hidden; }
.auction-upcoming p span { font-size: .72rem; font-weight: 1000; letter-spacing: .28em; text-transform: uppercase; }
.auction-previous { display: flex; align-items: center; gap: 18px; padding: 14px 18px; border: 3px solid var(--ink); border-radius: 16px; background: #f4eff9; color: var(--ink); }
.auction-previous.is-won { background: #fff3b0; }
.auction-previous p { margin: 0; line-height: 1.5; }
.auction-previous p > span { display: block; color: #625c6d; font-size: .7rem; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.auction-previous a { color: inherit; font-weight: 800; }
.auction-previous-card { position: relative; flex: none; width: 84px; }
.auction-previous-card .trading-card { width: 100%; }
.auction-stamp { position: absolute; left: 50%; top: 46%; z-index: 2; pointer-events: none; padding: 3px 9px; border: 3px double #c8102e; border-radius: 6px; background: #fff9; color: #c8102e; font-size: .9rem; font-weight: 1000; letter-spacing: .12em; text-transform: uppercase; transform: translate(-50%, -50%) rotate(-14deg); }
.auction-stamp.is-unsold { border-color: #625c6d; color: #625c6d; }
.auction-stamp.is-fresh { animation: auction-slam .55s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes auction-slam { from { opacity: 0; transform: translate(-50%, -50%) rotate(-30deg) scale(2.4); } to { opacity: 1; transform: translate(-50%, -50%) rotate(-14deg) scale(1); } }

.motion-reduced .auction-card, .motion-reduced .auction-clock strong, .motion-reduced .auction-quote.is-bumped,
.motion-reduced .auction-stamp.is-fresh, .motion-reduced .market-tab-timer::before { animation: none; }
.motion-reduced .auction-submit, .motion-reduced .auction-card .card-preview-button { transition: none; }

@media (max-width: 760px) {
    .auction-stage { grid-template-columns: 1fr; }
    .auction-spotlight { padding: 30px 20px 36px; }
    .auction-card { width: min(62vw, 230px); }
    .auction-desk { padding: 22px 18px; border-top: 3px solid var(--ink); border-left: 0; }
    .auction-bids { padding: 14px; }
    .auction-bids-list li { gap: 10px; padding: 8px 10px; }
}
