/* Game District shop: the showcase carousel (hub-showcase.js). Fixed heights, so changing slides never moves the page. */
#hubShowcase { margin: 0 0 14px; }
#hubShowcase[hidden] { display: none !important; }
/* the carousel replaces the old single "Featured today" hero (it is one of the slides now) */
#dashboardShopPanel.has-showcase .hub-feature { display: none !important; }

.hub-sc {
    --sc-h: 340px; position: relative; border-radius: 24px; overflow: hidden; outline: none;
    background: var(--surface); border: 2px solid var(--btn-edge, var(--line-2));
    box-shadow: 6px 6px 0 color-mix(in srgb, var(--magenta, #ff4fa3) 55%, transparent), var(--shadow-sm);
}
.hub-sc::before { /* the 90s stripe */
    content: ''; position: absolute; left: 0; right: 0; top: 0; height: 5px; z-index: 3; pointer-events: none;
    background: linear-gradient(90deg, var(--teal, #2ee6d6) 0 25%, var(--magenta, #ff4fa3) 25% 50%, var(--sun, #ffd23f) 50% 75%, var(--grape, #7b4dff) 75%);
}
.hub-sc-viewport { position: relative; overflow: hidden; height: var(--sc-h); touch-action: pan-y; outline: none; user-select: none; -webkit-user-select: none; }
.hub-sc-viewport:focus-visible { box-shadow: inset 0 0 0 3px var(--focus, var(--gold)); }
.hub-sc-track { display: flex; height: 100%; transition: transform .45s cubic-bezier(.2, .8, .2, 1); will-change: transform; }
.hub-sc.is-dragging .hub-sc-track { transition: none; }
.hub-sc.is-still .hub-sc-track { transition: none; will-change: auto; }

.hub-sc-slide {
    --rar: var(--rar-common); --sc-c: var(--rar); flex: 0 0 100%; min-width: 0; height: 100%; position: relative;
    display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: stretch;
    background:
        radial-gradient(circle at 26% 50%, color-mix(in srgb, var(--sc-c) 34%, transparent), transparent 62%),
        repeating-linear-gradient(135deg, transparent 0 22px, color-mix(in srgb, var(--sc-c) 6%, transparent) 22px 24px),
        linear-gradient(120deg, var(--surface-2), var(--surface));
}
.hub-sc-slide.dashboard-rarity--uncommon { --rar: var(--rar-uncommon); }
.hub-sc-slide.dashboard-rarity--rare { --rar: var(--rar-rare); }
.hub-sc-slide.dashboard-rarity--epic { --rar: var(--rar-epic); }
.hub-sc-slide.dashboard-rarity--legendary { --rar: var(--rar-legendary); }
.hub-sc-slide.dashboard-rarity--mythic { --rar: var(--rar-mythic); }
.hub-sc-art { position: relative; display: grid; place-items: center; min-width: 0; min-height: 0; overflow: hidden; padding: 14px 10px 46px; }
.hub-sc-ph { width: 46%; aspect-ratio: 1; border-radius: 50%; background: color-mix(in srgb, var(--sc-c) 14%, transparent); }
.hub-sc-copy { display: grid; align-content: center; justify-items: start; gap: 8px; padding: 22px clamp(18px, 3vw, 40px) 54px 8px; min-width: 0; }
.hub-sc-kicker {
    display: inline-flex; align-items: center; gap: 6px; padding: 3px 12px; border-radius: 999px; font-size: .74rem; font-weight: 900;
    text-transform: uppercase; letter-spacing: .08em; color: var(--on-gold); background: var(--sun, var(--gold)); box-shadow: 2px 2px 0 var(--btn-edge, rgba(0, 0, 0, .4));
}
.hub-sc--grand .hub-sc-kicker, .hub-sc--set .hub-sc-kicker:has(.bi-gem) { background: linear-gradient(90deg, var(--sun, #ffd23f), var(--magenta, #ff4fa3)); color: #1a0b2e; }
.hub-sc-title {
    font-family: var(--font-display); font-size: clamp(1.5rem, 3vw, 2.5rem); line-height: 1.02; margin: 0; overflow-wrap: anywhere;
    color: var(--title, var(--text)); text-shadow: 2px 2px 0 var(--title-shadow, transparent), 4px 4px 0 var(--title-shadow-2, transparent);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.hub-sc-line { color: var(--muted); max-width: 52ch; font-size: .95rem; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hub-sc-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.hub-sc-col { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 900; text-transform: uppercase; letter-spacing: .05em; color: var(--sc-c); }
:root[data-theme="day"] .hub-sc-col, :root[data-theme="contrast"] .hub-sc-col { color: var(--text); }
.hub-sc-price { display: inline-flex; align-items: baseline; gap: 8px; font-size: 1.1rem; font-weight: 900; }
.hub-sc-price small { color: var(--muted); font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.hub-sc-price.is-done { color: var(--green); font-size: .95rem; }
.hub-sc-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.hub-sc-actions .retro-button, .hub-sc-actions .retro-button-secondary { min-height: 42px; }

/* pictures */
.hub-sc-figure { display: grid; place-items: center; height: 100%; aspect-ratio: 1 / 1; max-width: 100%; }
.hub-sc-figure > *, .hub-sc-figure img, .hub-sc-figure svg { width: 100%; height: 100%; display: block; }
.hub-sc-figure { border-radius: 20px; overflow: hidden; box-shadow: 0 0 0 2px color-mix(in srgb, var(--sc-c) 50%, transparent), 0 0 40px color-mix(in srgb, var(--sc-c) 30%, transparent); }
.hub-sc-figure.is-mosaic .hub-sb-mosaic { width: 100%; height: 100%; }
.hub-sc-trio { position: relative; width: 100%; height: 100%; }
.hub-sc-trio-cell { position: absolute; top: 50%; aspect-ratio: 1; height: 72%; border-radius: 18px; overflow: hidden; background: var(--surface-2); border: 2px solid var(--btn-edge, var(--line-2)); box-shadow: 4px 4px 0 color-mix(in srgb, var(--sc-c) 55%, transparent); }
.hub-sc-trio-cell > *, .hub-sc-trio-cell img, .hub-sc-trio-cell svg { width: 100%; height: 100%; display: block; }
.hub-sc-trio-cell.is-0 { left: 50%; transform: translate(-50%, -50%); z-index: 2; height: 84%; }
.hub-sc-trio-cell.is-1 { left: 4%; transform: translateY(-46%) rotate(-6deg); }
.hub-sc-trio-cell.is-2 { right: 4%; transform: translateY(-46%) rotate(6deg); }
.hub-sc-hero { display: grid; place-items: center; width: 82%; max-width: 280px; aspect-ratio: 1; border-radius: 20px; overflow: hidden; background: var(--surface-2); border: 2px solid var(--btn-edge, var(--line-2)); box-shadow: 4px 4px 0 color-mix(in srgb, var(--sc-c) 55%, transparent); }
.hub-sc-hero .hub-item-art { width: 100%; height: 100%; display: grid; place-items: center; }
.hub-sc-fan { position: relative; width: 100%; height: 100%; }
.hub-sc-fan-card {
    --rar: var(--rar-common); position: absolute; top: 50%; left: calc(50% + (var(--k) - 2) * 17%); height: 78%; aspect-ratio: 3 / 4; max-width: 30%;
    transform: translate(-50%, -50%) rotate(calc((var(--k) - 2) * 6deg)); z-index: calc(10 - var(--k));
    display: grid; grid-template-rows: 1fr auto; padding: 6px; gap: 4px; border-radius: 14px; cursor: pointer; font: inherit; color: var(--text);
    background: var(--surface); border: 2px solid var(--rar); box-shadow: 3px 3px 0 color-mix(in srgb, var(--rar) 55%, transparent);
    transition: transform .2s;
}
.hub-sc-fan.is-n1 .hub-sc-fan-card { left: 50%; transform: translate(-50%, -50%); max-width: 60%; }
.hub-sc-fan.is-n2 .hub-sc-fan-card, .hub-sc-fan.is-n3 .hub-sc-fan-card, .hub-sc-fan.is-n4 .hub-sc-fan-card { left: calc(50% + (var(--k) - 1) * 22%); }
.hub-sc-fan-card:first-child { z-index: 11; }
.hub-sc-fan-card.dashboard-rarity--uncommon { --rar: var(--rar-uncommon); }
.hub-sc-fan-card.dashboard-rarity--rare { --rar: var(--rar-rare); }
.hub-sc-fan-card.dashboard-rarity--epic { --rar: var(--rar-epic); }
.hub-sc-fan-card.dashboard-rarity--legendary { --rar: var(--rar-legendary); }
.hub-sc-fan-card.dashboard-rarity--mythic { --rar: var(--rar-mythic); }
.hub-sc-fan-card:hover { transform: translate(-50%, -54%) rotate(calc((var(--k) - 2) * 6deg)); z-index: 20; }
.hub-sc-fan-art { display: grid; place-items: center; min-height: 0; overflow: hidden; border-radius: 10px; background: var(--surface-2); }
.hub-sc-fan-art > * { max-width: 100%; max-height: 100%; }
.hub-sc-fan-name { font-size: .72rem; font-weight: 800; line-height: 1.15; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; text-align: center; }

/* nav: arrows, dots with the timer, play/pause */
.hub-sc-nav { position: absolute; left: 0; right: 0; bottom: 10px; z-index: 4; display: flex; align-items: center; justify-content: center; gap: 8px; pointer-events: none; }
.hub-sc-nav > * { pointer-events: auto; }
.hub-sc-arrow, .hub-sc-play {
    width: 36px; height: 36px; display: inline-grid; place-items: center; border-radius: 50%; cursor: pointer; font-size: 1rem;
    background: rgba(10, 6, 28, .72); color: #f6efe0; border: 1px solid rgba(255, 255, 255, .2);
}
.hub-sc-arrow:hover, .hub-sc-play:hover, .hub-sc-arrow:focus-visible, .hub-sc-play:focus-visible { border-color: var(--sun, var(--gold)); color: #fff; }
.hub-sc-play[hidden] { display: none; }
.hub-sc-dots { display: flex; align-items: center; gap: 2px; padding: 0 6px; border-radius: 999px; background: rgba(10, 6, 28, .55); }
.hub-sc-dot { width: 28px; height: 36px; padding: 0; border: 0; background: none; cursor: pointer; display: inline-grid; place-items: center; }
.hub-sc-dot i { position: relative; display: block; width: 10px; height: 10px; border-radius: 999px; background: rgba(255, 255, 255, .42); overflow: hidden; transition: width .25s; }
.hub-sc-dot.is-on i { width: 24px; background: rgba(255, 255, 255, .3); }
.hub-sc-dot.is-on i::after { content: ''; position: absolute; inset: 0; background: var(--sun, var(--gold)); transform-origin: left; }
.hub-sc.is-tick:not(.is-paused):not(.is-still) .hub-sc-dot.is-on i::after { animation: hubScTick 7s linear forwards; }
.hub-sc.is-paused .hub-sc-dot.is-on i::after { animation-play-state: paused; }
.hub-sc-dot:focus-visible { outline: 2px solid var(--sun, var(--gold)); outline-offset: -4px; border-radius: 8px; }
@keyframes hubScTick { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* narrower screens: picture above the copy */
@media (max-width: 900px) {
    .hub-sc { --sc-h: 380px; }
    .hub-sc-slide { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); }
}
@media (max-width: 640px) {
    .hub-sc { --sc-h: 476px; border-radius: 18px; box-shadow: 4px 4px 0 color-mix(in srgb, var(--magenta, #ff4fa3) 55%, transparent); }
    .hub-sc-slide { grid-template-columns: 1fr; grid-template-rows: 172px 1fr; }
    .hub-sc-art { padding: 12px 10px 0; }
    .hub-sc-copy { align-content: start; padding: 10px 14px 60px; gap: 6px; }
    .hub-sc-kicker { font-size: .68rem; }
    .hub-sc-title { font-size: 1.32rem; }
    .hub-sc-line { font-size: .86rem; -webkit-line-clamp: 2; }
    .hub-sc-col { display: none; }
    .hub-sc-actions { gap: 6px; flex-wrap: nowrap; max-width: 100%; }
    .hub-sc-actions .retro-button, .hub-sc-actions .retro-button-secondary { min-height: 44px; padding-inline: 12px; white-space: nowrap; }
    /* a secondary Preview is just the eye on phones (the label stays for screen readers) */
    .hub-sc-actions .hub-sc-pv.retro-button-secondary { flex: 0 0 44px; width: 44px; padding: 0; justify-content: center; }
    .hub-sc-actions .hub-sc-pv.retro-button-secondary .retro-button-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    .hub-sc-fan-card { height: 86%; max-width: 34%; }
    .hub-sc-trio-cell { height: 80%; }
    .hub-sc-trio-cell.is-0 { height: 96%; }
    .hub-sc-dot { width: 22px; height: 40px; }
    .hub-sc-arrow, .hub-sc-play { width: 40px; height: 40px; }
}

/* motion off: no slide, no timer, no hover lifts */
.hub-sc.is-still .hub-sc-fan-card { transition: none; }
.hub-sc.is-still .hub-sc-fan-card:hover { transform: translate(-50%, -50%) rotate(calc((var(--k) - 2) * 6deg)); }
.hub-sc.is-still .hub-sc-dot.is-on i::after { display: none; }
.hub-sc.is-still .hub-sc-dot.is-on i { background: var(--sun, var(--gold)); }
html[data-lite="1"] .hub-sc { box-shadow: 4px 4px 0 color-mix(in srgb, var(--magenta, #ff4fa3) 55%, transparent); }
html[data-lite="1"] .hub-sc-figure { box-shadow: 0 0 0 2px color-mix(in srgb, var(--sc-c) 50%, transparent); }
/* the fan's pictures are painted lazily: let a click land on the card button itself */
.hub-sc-fan-card > *, .hub-sc-fan-card > * * { pointer-events: none; }
