/* Game District shop: storefront, filters, item cards, context stages, preview window, generated item art. */

.hub-shop-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 28px; margin-bottom: 18px; }
.hub-shop-head h2 { font-family: var(--font-display); font-size: clamp(1.5rem, 3vw, 2.3rem); line-height: 1.05; margin: 4px 0 6px; }
.hub-shop-head p { color: var(--muted); max-width: 62ch; }
.hub-shop-wallet { display: grid; gap: 4px; justify-items: end; }
.hub-shop-wallet-label { font-size: .72rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.hub-shop-wallet .dashboard-coin-balance { font-size: 1.4rem; padding: 8px 18px; }

/* ------------------------------------------------------------- context stages (where an item would live) */
.hub-ctx { --ctx-a: #2d2559; --ctx-b: #1a1536; position: relative; background: radial-gradient(120% 90% at 50% 0%, var(--ctx-a), var(--ctx-b)); }
.hub-ctx--hangman { --ctx-a: #4a2a86; --ctx-b: #150c33; background: radial-gradient(70% 70% at 50% 25%, rgba(255, 224, 150, .35), transparent 60%), linear-gradient(180deg, #2a1658, #120a2c 70%, #4a2f1a 70%, #2e1c0f); }
.hub-ctx--minesweeper { --ctx-a: #3a3d46; --ctx-b: #16171c; background: radial-gradient(60% 60% at 50% 0%, rgba(255, 178, 62, .22), transparent 60%), repeating-linear-gradient(135deg, #25272d 0 12px, #1d1f24 12px 24px); }
.hub-ctx--pexeso { --ctx-a: #2f6b4a; --ctx-b: #123322; background: radial-gradient(90% 80% at 50% 30%, #2e7050, #11301f); }
.hub-ctx--piskvorky { --ctx-a: #f4ecd6; --ctx-b: #e4d8b4; background: repeating-linear-gradient(0deg, transparent 0 15px, rgba(70, 110, 170, .28) 15px 16px), linear-gradient(90deg, transparent 22px, rgba(200, 80, 60, .5) 22px 23px, transparent 23px), #f2ead4; }
.hub-ctx--word-guess { --ctx-a: #274b5c; --ctx-b: #121f2b; background: radial-gradient(70% 60% at 30% 10%, rgba(255, 220, 140, .3), transparent 60%), linear-gradient(180deg, #1c3646, #0f1b26); }
.hub-ctx--darts, .hub-ctx--clovece, .hub-ctx--prsi, .hub-ctx--lode { background: radial-gradient(80% 70% at 50% 20%, #6e4524, #2a170a); }
.hub-ctx--global { background: radial-gradient(80% 70% at 30% 0%, rgba(255, 95, 162, .35), transparent 60%), radial-gradient(80% 70% at 100% 100%, rgba(82, 214, 255, .3), transparent 60%), #1c1540; }
.hub-ctx--avatar { background: radial-gradient(80% 80% at 50% 30%, #41377a, #1e1744); }

/* ------------------------------------------------------------- layout */
.hub-shop-front { display: grid; gap: 26px; margin-bottom: 28px; }
.hub-feature { display: grid; grid-template-columns: minmax(220px, .8fr) 1.2fr; gap: 0; border-radius: 22px; overflow: hidden; border: 1px solid color-mix(in srgb, var(--rar, var(--gold)) 55%, transparent); background: var(--surface); box-shadow: var(--shadow), 0 0 40px color-mix(in srgb, var(--rar, #000) 18%, transparent); }
.hub-feature-stage { display: grid; place-items: center; min-height: 240px; padding: 16px; }
.hub-feature-copy { display: grid; align-content: center; gap: 10px; padding: clamp(16px, 2.4vw, 28px); }
.hub-feature-copy h3 { font-family: var(--font-display); font-size: clamp(1.4rem, 2.6vw, 2.1rem); line-height: 1.05; }
.hub-feature-copy p { color: var(--muted); max-width: 54ch; }
.hub-feature-buy { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 4px; }
.hub-front-section .hub-strip-head h3 { font-family: var(--font-display); font-size: 1.1rem; letter-spacing: .02em; display: flex; gap: 8px; align-items: center; }
.hub-front-section .hub-strip-head h3 i { color: var(--gold); }
.hub-link { margin-left: auto; background: none; border: 0; color: var(--gold); font-weight: 900; cursor: pointer; text-decoration: underline; padding: 4px; }
.hub-front-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 232px); gap: 14px; overflow-x: auto; padding: 6px 4px 14px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.hub-front-row > * { scroll-snap-align: start; }
.hub-sets { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 14px; }
.hub-set { display: grid; gap: 10px; padding: 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.hub-set-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.hub-set-top span { font-weight: 900; color: var(--gold); font-variant-numeric: tabular-nums; }
.hub-set-bar { height: 8px; border-radius: 6px; background: var(--bg-2); overflow: hidden; }
.hub-set-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--green), var(--cyan)); border-radius: 6px; }
.hub-set-thumbs { display: flex; gap: 6px; flex-wrap: wrap; }
.hub-set-thumb { width: 46px; height: 46px; padding: 3px; border-radius: 10px; border: 1px dashed var(--line-2); background: var(--bg-2); cursor: pointer; opacity: .6; overflow: hidden; display: grid; place-items: center; }
.hub-set-thumb.is-owned { opacity: 1; border-style: solid; border-color: var(--green); }
.hub-set-thumb > * { max-width: 100%; max-height: 100%; }

.dashboard-shop-market { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 22px; align-items: start; }
.dashboard-shop-rail { position: sticky; top: calc(var(--top-h) + 12px); max-height: calc(100vh - var(--top-h) - 24px); overflow: auto; padding: 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); scrollbar-width: thin; }
.dashboard-shop-filters { display: grid; gap: 16px; }
.dashboard-shop-chiprow { display: flex; flex-wrap: wrap; gap: 6px; }
.dashboard-shop-chiprow .hub-chip { padding: 5px 10px; font-size: .78rem; }
.dashboard-shop-category-block { display: grid; gap: 8px; }
.dashboard-shop-filter-title { font-size: .72rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.dashboard-shop-category-list { display: flex; flex-direction: column; gap: 3px; max-height: 260px; overflow: auto; scrollbar-width: thin; }
.dashboard-shop-category-list--compact { flex-direction: row; flex-wrap: wrap; max-height: none; gap: 5px; }
.dashboard-shop-category {
    display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 10px; border-radius: 10px; border: 1px solid transparent;
    background: transparent; color: var(--muted); font-weight: 800; font-size: .84rem; text-align: left; cursor: pointer;
}
.dashboard-shop-category:hover { background: var(--surface-2); color: var(--text); }
.dashboard-shop-category.is-active { background: color-mix(in srgb, var(--gold) 16%, var(--surface-2)); border-color: var(--gold); color: var(--text); }
.dashboard-shop-category-list--compact .dashboard-shop-category { width: auto; border-color: var(--line); background: var(--bg-2); }
.dashboard-shop-category--rarity { color: var(--rar, var(--muted)); }
.dashboard-shop-category-icon { width: 20px; height: 20px; display: inline-grid; place-items: center; flex: 0 0 auto; font-size: .9rem; overflow: hidden; }
.dashboard-shop-category-icon img, .dashboard-shop-category-icon svg { width: 100%; height: 100%; object-fit: contain; }
.dashboard-shop-sort-menu { position: relative; }
.dashboard-shop-sort-menu summary { list-style: none; display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--bg-2); cursor: pointer; font-weight: 800; }
.dashboard-shop-sort-menu summary::-webkit-details-marker { display: none; }
.dashboard-shop-sort-options { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 6px); display: grid; padding: 6px; border-radius: 14px; background: var(--surface-3); border: 1px solid var(--line-2); box-shadow: var(--shadow); }
.dashboard-shop-sort-options button { text-align: left; padding: 8px 10px; border-radius: 8px; border: 0; background: transparent; color: var(--text); font-weight: 800; cursor: pointer; }
.dashboard-shop-sort-options button:hover, .dashboard-shop-sort-options button.is-active { background: var(--gold); color: var(--on-gold); }

.dashboard-shop-display-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.dashboard-shop-display-head strong { font-family: var(--font-display); font-size: 1.2rem; font-weight: 400; }
.hub-shop-count { color: var(--muted); font-weight: 800; font-size: .85rem; }
.dashboard-shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 16px; }
.dashboard-shop-grid > .retro-empty, .dashboard-shop-grid > .hub-more { grid-column: 1 / -1; }
.hub-more { display: grid; place-items: center; padding: 10px; }

/* ------------------------------------------------------------- item card */
.hub-item {
    position: relative; display: grid; grid-template-rows: auto 1fr auto; overflow: hidden; border-radius: 16px;
    background: var(--surface); border: 1px solid color-mix(in srgb, var(--rar, var(--line)) 35%, var(--line)); box-shadow: var(--shadow-sm);
    transition: transform .18s, box-shadow .18s, border-color .18s;
}
.hub-item:hover, .hub-item:focus-within { transform: translateY(-3px); border-color: var(--rar, var(--gold)); box-shadow: 0 12px 26px rgba(0, 0, 0, .4), 0 0 24px color-mix(in srgb, var(--rar, #000) 28%, transparent); }
.hub-item.is-equipped { box-shadow: 0 0 0 2px var(--green), var(--shadow-sm); }
.hub-item.is-new-owned { animation: hubOwned .9s cubic-bezier(.2, .9, .3, 1.3); }
@keyframes hubOwned { 0% { transform: scale(.94); box-shadow: 0 0 0 0 var(--green); } 40% { transform: scale(1.04); box-shadow: 0 0 0 10px rgba(95, 227, 161, .35); } 100% { transform: none; box-shadow: var(--shadow-sm); } }
.hub-item-stage {
    position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 16 / 11; padding: 10px; border: 0; cursor: var(--gcur-zoom, pointer); overflow: hidden; color: inherit;
}
.hub-item-stage::after { content: ''; position: absolute; inset: auto 0 0 0; height: 4px; background: var(--rar, var(--rar-common)); box-shadow: 0 0 14px var(--rar, transparent); }
.hub-item-art { display: grid; place-items: center; width: 100%; height: 100%; }
.hub-item-art > *, .hub-item-art .hub-pv-wrap { max-width: 100%; max-height: 100%; }
.hub-item-art svg:not(.hub-pv) { max-width: 100%; max-height: 100%; }
.hub-item-art--big { min-height: 220px; width: 100%; }
.hub-item-art--big > * { max-height: 300px; }
.hub-item-eye { position: absolute; right: 8px; top: 8px; display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; background: rgba(8, 5, 20, .78); color: #fff; font-size: .7rem; font-weight: 900; opacity: 0; transform: translateY(-4px); transition: opacity .15s, transform .15s; }
.hub-item:hover .hub-item-eye, .hub-item-stage:focus-visible .hub-item-eye { opacity: 1; transform: none; }
.hub-item-state { position: absolute; left: 8px; top: 8px; z-index: 2; display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: .7rem; font-weight: 900; background: rgba(8, 5, 20, .82); color: #fff; border: 1px solid var(--line-2); }
.hub-item-state.is-equipped { background: var(--green); color: #052a17; border-color: transparent; }
.hub-item-state.is-owned { color: var(--green); border-color: color-mix(in srgb, var(--green) 55%, transparent); }
.hub-item-state.is-new { background: var(--pink); color: #fff; border-color: transparent; }
.hub-preview-head .hub-item-state, .hub-item-chips .hub-item-state { position: static; }
.hub-item-body { display: grid; align-content: start; gap: 5px; padding: 10px 12px 4px; }
.hub-item-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.hub-chip-game { font-size: .68rem; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; color: var(--cyan); }
.hub-item-name { font-weight: 900; font-size: 1rem; line-height: 1.2; }
.hub-item-desc { color: var(--muted); font-size: .8rem; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hub-item-type { color: var(--dim); font-weight: 700; font-size: .72rem; }
.hub-item-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px 12px; flex-wrap: wrap; }
.hub-item-price { display: grid; gap: 4px; min-width: 70px; }
.hub-item-price.is-muted { color: var(--muted); font-weight: 800; font-size: .8rem; }
.hub-afford { display: block; height: 4px; border-radius: 3px; background: var(--bg-2); overflow: hidden; }
.hub-afford i { display: block; height: 100%; background: var(--gold); }
.dashboard-shop-actions { margin-left: auto; }
.hub-item .retro-button, .hub-item .retro-button-secondary { min-height: 36px; padding: 6px 12px; font-size: .84rem; }
.hub-item--compact .hub-item-stage { aspect-ratio: 16 / 10; }

/* ------------------------------------------------------------- preview window */
.hub-preview-dialog { width: min(1080px, 100%); max-height: min(calc(100vh - 32px), 880px); max-height: min(calc(100dvh - 32px), 880px); padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.hub-preview-dialog > .hub-close { position: absolute; right: 12px; top: 12px; z-index: 5; }
/* the window never grows past the viewport: the info column scrolls inside and its footer (coins, Buy, prev/next) stays put */
.hub-preview-body { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(340px, .95fr); grid-template-rows: minmax(0, 1fr); }
.hub-preview-stage { position: relative; display: grid; place-items: center; padding: 28px; min-height: 340px; overflow: hidden; }
.hub-preview-stage .hub-pv, .hub-preview-stage > .hub-item-art svg.hub-pv { width: min(100%, 440px); height: auto; filter: drop-shadow(0 12px 18px rgba(0, 0, 0, .45)); }
.hub-preview-info { display: flex; flex-direction: column; min-height: 0; min-width: 0; background: var(--surface); border-left: 3px solid var(--rar, var(--line)); }
.hub-preview-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; display: grid; align-content: start; gap: 14px; padding: 26px 24px 16px; scrollbar-width: thin; }
.hub-preview-scroll > * { min-width: 0; }
.hub-preview-foot { flex: 0 0 auto; display: grid; gap: 10px; padding: 12px 24px 16px; background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -10px 18px -12px rgba(0, 0, 0, .5); }
.hub-preview-head h2 { font-family: var(--font-display); font-size: 1.55rem; line-height: 1.1; margin: 6px 0 8px; font-weight: 400; }
/* body.hub-page h2 { margin: 0 } outranks the rule above: give the rarity chip real room under the (possibly wrapping) title */
body.hub-page .hub-preview-head h2 { margin: 4px 0 10px; }
/* Back (the window's own history): a chunky pill left of the close button, hidden while there is nowhere to go back to */
.hub-pv-back { position: absolute; right: 58px; top: 12px; z-index: 5; height: 38px; display: inline-flex; align-items: center; gap: 6px; padding: 0 14px 0 11px; border-radius: 12px; border: 2px solid var(--btn-edge, var(--line-2)); background: var(--surface-2); color: var(--text); font: inherit; font-weight: 900; font-size: .88rem; cursor: pointer; box-shadow: 3px 3px 0 var(--btn-edge, rgba(0, 0, 0, .45)); }
.hub-pv-back[hidden] { display: none; }
@media (min-width: 1101px) {
    /* side by side, Back and close sit over the kicker line: keep a long kicker clear of them */
    .hub-preview-dialog:has(> .hub-pv-back:not([hidden])) .hub-preview-head .retro-kicker { display: block; padding-right: 150px; }
}
.hub-pv-back i { font-size: 1rem; }
.hub-pv-back:hover { background: var(--teal, var(--cyan)); color: #10061f; }
.hub-pv-back:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.hub-pv-back:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--btn-edge, rgba(0, 0, 0, .45)); }
.hub-preview-desc { color: var(--text); }
.hub-preview-flavor { color: var(--muted); font-style: italic; }
.hub-preview-stats { display: flex; flex-wrap: wrap; gap: 6px; }
.hub-preview-stats span { padding: 3px 10px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--line); font-size: .76rem; font-weight: 800; color: var(--muted); }
.hub-preview-set { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); }
.hub-preview-set i { color: var(--gold); font-size: 1.2rem; }
.hub-preview-set span { display: grid; }
.hub-preview-set small { color: var(--muted); font-weight: 700; }
.hub-wallet-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 12px; border-radius: 12px; background: var(--bg-2); font-weight: 800; font-size: .88rem; }
.hub-wallet-line.is-short { color: var(--red); border: 1px solid color-mix(in srgb, var(--red) 50%, transparent); }
.hub-wallet-line > span { display: inline-flex; gap: 6px; align-items: center; }
.hub-preview-buy { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.hub-preview-buy:empty { display: none; }
.hub-preview-buy .dashboard-shop-actions { margin-left: auto; }
.hub-preview-buy .retro-button, .hub-preview-buy .retro-button-secondary { min-height: 46px; padding: 8px 20px; font-size: 1rem; }
.hub-preview-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.hub-preview-nav .retro-button-secondary { min-height: 38px; padding: 6px 14px; }
.hub-tryon { margin-top: 2px; }
.hub-avatar-stage { display: grid; place-items: center; width: min(100%, 240px); aspect-ratio: 4 / 5; border-radius: 20px; overflow: hidden; background: rgba(255, 255, 255, .06); border: 1px solid var(--line-2); }
.hub-avatar-stage svg { width: 100%; height: 100%; display: block; }
.hub-avatar-stage--bg { aspect-ratio: 1; width: min(100%, 260px); }
.hub-avatar-stage--bg .dashboard-mini-avatar-bg { width: 100%; height: 100%; border-radius: 0; }
.hub-frame-stage { display: grid; gap: 14px; justify-items: center; }
.hub-frame-stage small { color: var(--muted); font-weight: 800; }
.hub-frame-stage .dashboard-card-name-frame { font-size: 1.6rem; }

/* confirmation */
.hub-confirm { width: min(460px, 100%); display: grid; gap: 14px; }
.hub-confirm h2 { font-family: var(--font-display); font-size: 1.3rem; font-weight: 400; }
.hub-confirm-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-height: 260px; overflow: auto; }
.hub-confirm-list li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 12px; border-radius: 10px; background: var(--bg-2); font-weight: 800; }
.hub-confirm-total { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.hub-confirm-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.hub-buy-confirm { width: min(440px, 100%); }
.hub-buy-confirm .hub-confirm-body { display: grid; gap: 12px; }
.hub-buy-item { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); border-left: 3px solid var(--rar, var(--line)); }
.hub-buy-art { width: 64px; height: 64px; border-radius: 10px; overflow: hidden; display: grid; place-items: center; }
.hub-buy-art > * { max-width: 100%; max-height: 100%; }
.hub-buy-copy { display: grid; gap: 3px; min-width: 0; justify-items: start; }
.hub-buy-copy strong { font-weight: 900; line-height: 1.2; overflow-wrap: anywhere; }
.hub-buy-copy small { color: var(--muted); font-weight: 700; font-size: .78rem; }
.hub-buy-purse { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 12px; border-radius: 12px; background: var(--bg-2); font-weight: 800; font-size: .88rem; }
.hub-buy-purse-label { color: var(--muted); }
.hub-buy-purse-flow { display: inline-flex; align-items: center; gap: 8px; }
.hub-buy-purse.is-short { color: var(--red); }
.hub-dont-ask { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; cursor: pointer; width: max-content; max-width: 100%; }
.hub-dont-ask input { width: 18px; height: 18px; accent-color: var(--gold); cursor: pointer; margin: 0; }
.hub-dont-ask-note { color: var(--muted); font-size: .76rem; margin-top: -6px; }
.hub-prompt-field { display: grid; gap: 6px; font-weight: 800; }
.hub-prompt-field span { color: var(--muted); font-size: .84rem; }
.hub-prompt-field input { width: 100%; }
.hub-toast-action { margin-left: auto; padding: 5px 12px; border-radius: 10px; border: 1px solid var(--gold); background: var(--gold); color: var(--on-gold); font-weight: 900; cursor: pointer; }

/* ------------------------------------------------------------- generated item art */
.hub-pv-wrap { display: grid; place-items: center; width: 100%; height: 100%; position: relative; }
.hub-pv { display: block; width: 100%; height: 100%; max-height: 100%; overflow: visible; }
.hub-pv-thing { position: relative; display: grid; place-items: center; width: 100%; height: 100%; }
.hub-pv-thing > .bi { position: absolute; font-size: clamp(1.3rem, 36%, 3.4rem); filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .7)); }
.hub-pv-stage { border-radius: 10px; }
.hub-pv-pulse { transform-origin: 48px 32px; animation: hubPulse 1.4s ease-in-out infinite; }
@keyframes hubPulse { 50% { transform: scale(1.08); } }
.hub-pv-float { animation: hubFloat 2.4s ease-in-out infinite; transform-box: fill-box; }
@keyframes hubFloat { 50% { transform: translateY(-3px); } }
.hub-pv-sway { transform-box: fill-box; transform-origin: 50% 0; animation: hubSway 3s ease-in-out infinite; }
@keyframes hubSway { 50% { transform: rotate(2deg); } }
.hub-pv-fxstage { position: relative; display: block; width: 100%; height: 100%; min-height: 70px; overflow: hidden; border-radius: 10px; }
.hub-fx-core { position: absolute; left: 50%; top: 56%; width: 26%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(circle, var(--c), transparent 70%); opacity: .55; }
.hub-fx-p { position: absolute; top: 100%; background: var(--c); border-radius: 50%; animation: hubRise 1.6s ease-out infinite; }
.hub-fx-p--square { border-radius: 2px; animation-name: hubFall; top: -10%; }
.hub-fx-p--heart { border-radius: 50% 50% 0 0; transform: rotate(-45deg); }
.hub-fx-p--drop { border-radius: 50% 50% 50% 0; transform: rotate(-45deg); animation-name: hubFall; top: -10%; }
@keyframes hubRise { 0% { transform: translateY(0) scale(.6); opacity: 0; } 20% { opacity: 1; } 100% { transform: translateY(-140px) translateX(14px) scale(1); opacity: 0; } }
@keyframes hubFall { 0% { transform: translateY(0) rotate(0); opacity: 0; } 15% { opacity: 1; } 100% { transform: translateY(150px) translateX(-10px) rotate(300deg); opacity: 0; } }
.hub-pv-fxstage.is-still .hub-fx-p { animation: none; top: 40%; opacity: .8; }
body[data-motion="reduced"] .hub-fx-p { animation: none; top: 45%; opacity: .8; }

/* ------------------------------------------------------------- responsive */
@media (max-width: 1100px) {
    .dashboard-shop-market { grid-template-columns: 1fr; }
    .dashboard-shop-rail { position: static; max-height: none; }
    .dashboard-shop-filters { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
    .dashboard-shop-category-list { max-height: 150px; }
    .hub-preview-body { grid-template-columns: 1fr; }
    .hub-preview-info { border-left: 0; border-top: 3px solid var(--rar, var(--line)); }
}
@media (min-width: 1101px) and (max-height: 800px) {
    .hub-preview-stage { min-height: 0; padding: 20px; }
    .hub-preview-scroll { padding-top: 22px; gap: 12px; }
}
@media (max-width: 1100px) {
    /* stacked: the whole body scrolls and the footer sticks to the bottom of the window */
    .hub-preview-body { display: block; overflow-y: auto; overscroll-behavior: contain; }
    .hub-preview-info { min-height: auto; }
    .hub-preview-scroll { overflow: visible; }
    .hub-preview-foot { position: sticky; bottom: 0; z-index: 3; }
    .hub-preview-stage { min-height: 0; height: min(38vh, 320px); }
}
@media (max-width: 700px) {
    .hub-feature { grid-template-columns: 1fr; }
    .hub-feature-stage { min-height: 170px; }
    .hub-shop-wallet { justify-items: start; }
    .dashboard-shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .hub-item-foot { padding: 6px 8px 10px; }
    .hub-item-body { padding: 8px 8px 2px; }
    .hub-item-desc { display: none; }
    .hub-front-row { grid-auto-columns: minmax(170px, 190px); }
    .hub-preview-stage { min-height: 250px; padding: 16px; }
}

/* legacy icon sprites (svg/img) need an explicit size inside the new stages */
.hub-item-art > svg.dashboard-shop-svg, .hub-item-art > img.dashboard-shop-svg, .hub-item-art > svg.dashboard-pixel-sprite, .hub-slot-art > svg, .hub-pick-art > svg { width: 64%; max-width: 120px; height: auto; aspect-ratio: 1; }
.hub-item-art--big > svg.dashboard-shop-svg, .hub-item-art--big > img.dashboard-shop-svg, .hub-item-art--big > svg.dashboard-pixel-sprite { width: 220px; max-width: 70%; }
.hub-slot-art > svg.dashboard-shop-svg, .hub-pick-art > svg.dashboard-shop-svg, .hub-slot-art > svg.dashboard-pixel-sprite, .hub-pick-art > svg.dashboard-pixel-sprite { width: 100%; max-width: none; }
.hub-item--compact .hub-item-art > svg.dashboard-shop-svg { width: 56%; }
.hub-shop-front, .hub-shop-front > *, .hub-front-section { min-width: 0; max-width: 100%; }
.dashboard-shop-shell, .dashboard-shop-display { min-width: 0; }

/* whole-set action bar (hub-sets.js) */
.hub-setbar { display: grid; gap: 8px; min-width: 0; }
.hub-setbar-head { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-weight: 800; }
.hub-setbar-head span { color: var(--muted); font-size: .84rem; }
.hub-setbar-bonus { display: flex; flex-wrap: wrap; gap: 6px; }
.hub-setbar-th { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--line); font-size: .76rem; font-weight: 700; color: var(--muted); }
.hub-setbar-th b { color: var(--text); }
.hub-setbar-th.is-on { border-color: var(--green); color: var(--text); } .hub-setbar-th.is-on i { color: var(--green); }
.hub-setbar-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.hub-setbar-actions .retro-button, .hub-setbar-actions .retro-button-secondary { min-height: 44px; }
.hub-setbar.is-compact .hub-setbar-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); }
.hub-setbar.is-compact .hub-setbar-actions .retro-button, .hub-setbar.is-compact .hub-setbar-actions .retro-button-secondary { min-height: 40px; padding: 6px 10px; font-size: .84rem; justify-content: center; white-space: normal; text-align: center; line-height: 1.15; }
.hub-setbar-result { margin: 0; display: flex; gap: 6px; align-items: center; font-weight: 800; font-size: .84rem; color: var(--green); }
.hub-setbar-missing { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.hub-setbar-ghost { display: grid; gap: 5px; justify-items: center; align-content: start; min-width: 0; padding: 8px 6px; border-radius: 12px; border: 1px dashed var(--line-2); background: var(--surface-2); }
.hub-setbar-ghost-art { width: 56px; height: 56px; padding: 0; border: 0; border-radius: 10px; background: var(--bg-2); overflow: hidden; opacity: .6; filter: saturate(.7); cursor: pointer; display: grid; place-items: center; }
.hub-setbar-ghost-art > * { max-width: 100%; max-height: 100%; }
.hub-setbar-ghost-name { font-size: .72rem; font-weight: 800; text-align: center; line-height: 1.15; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hub-setbar-buy { min-height: 32px !important; max-width: 100%; padding: 2px 8px !important; font-size: .74rem; display: inline-flex; align-items: center; justify-content: center; gap: 4px; white-space: nowrap; }
.hub-setbar-buy .dashboard-coin-amount { min-width: 0; gap: 3px; }
.hub-setbar-buy:disabled { opacity: .55; }
.hub-preview-set + .hub-setbar { margin-top: 8px; }
.dashboard-journal-setbar { grid-column: 1 / -1; }
.hub-lk-sets { display: grid; gap: 8px; margin-bottom: 14px; padding: 12px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface-2); }
.hub-lk-sets h4 { margin: 0; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.hub-lk-sets-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 10px; }
.hub-lk-set { display: grid; gap: 6px; padding: 10px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); min-width: 0; }
.hub-lk-set-head { display: flex; justify-content: space-between; gap: 8px; font-weight: 800; }
.hub-lk-set-head span { color: var(--muted); }
.is-syncing { opacity: .8; }

/* ------------------------------------------------------------- item window stage views (hub-shop.js stageFor)
 * The stage fills its pane: a views switch on top (Item | On you | Whole set), the scene or the close-up under it.
 * Controls that sit on the scene art use fixed dark glass, since the art looks the same in every theme. */
@media (min-width: 1101px) {
    .hub-preview-dialog { width: min(1240px, 100%); height: min(calc(100vh - 32px), 860px); height: min(calc(100dvh - 32px), 860px); }
    .hub-preview-body { grid-template-columns: minmax(0, 1.15fr) minmax(360px, .85fr); }
}
.hub-preview-stage { display: grid; grid-template-rows: minmax(0, 1fr); place-items: stretch; gap: 10px; padding: 16px; min-height: 0; }
.hub-preview-stage.has-views { grid-template-rows: auto minmax(0, 1fr); }
.hub-stage-views { justify-self: center; position: relative; z-index: 3; padding: 4px; border-radius: 999px; background: rgba(10, 6, 28, .62); border: 1px solid rgba(255, 255, 255, .14); }
.hub-stage-views button { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; color: #f6efe0; background: transparent; border-color: transparent; }
.hub-stage-views button[aria-pressed="true"] { background: var(--gold); color: var(--on-gold); }
.hub-stage-main { position: relative; display: grid; place-items: center; min-height: 0; min-width: 0; }
.hub-stage-main > .hub-stage-art { width: 100%; height: 100%; display: grid; place-items: center; }
.hub-preview-stage .hub-stage-main .hp-slot--modal { width: 100%; height: 100%; max-width: none; max-height: none; aspect-ratio: auto; }
.hub-stage-main > .hub-stage-art > svg.hub-pv { width: min(100%, 560px); max-height: 100%; }
.hub-preview-stage .hub-stage-main > .hub-avatar-stage--bg { width: auto; height: min(100%, 560px); max-width: 100%; aspect-ratio: 1; }
.hub-stage-main > .hub-frame-stage { width: 100%; }
@media (min-width: 1101px) { .hub-stage-main > .hub-frame-stage { zoom: 1.35; } }
/* the avatar scene: background and figure fill the pane (viewBox fitted by fitScene) */
.hub-pv-scene { position: absolute; inset: 0; border-radius: 18px; overflow: hidden; background: rgba(0, 0, 0, .18); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); }
.hub-pv-scene > svg { display: block; width: 100%; height: 100%; }
.hub-stage-tools { position: absolute; left: 12px; bottom: 12px; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; max-width: calc(100% - 24px); }
.hub-stage-tools--top { top: 12px; bottom: auto; }
.hub-stage-tools .hub-seg { padding: 4px; border-radius: 999px; background: rgba(10, 6, 28, .72); border: 1px solid rgba(255, 255, 255, .14); }
.hub-stage-tools .hub-seg button { border-radius: 999px; color: #f6efe0; background: transparent; border-color: transparent; }
.hub-stage-tools .hub-seg button[aria-pressed="true"] { background: var(--gold); color: var(--on-gold); }
.hub-stage-note, .hub-stage-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 6px 12px; border-radius: 999px; background: rgba(10, 6, 28, .72); border: 1px solid rgba(255, 255, 255, .16); color: #f6efe0; font: inherit; font-size: .84rem; font-weight: 800; }
.hub-stage-note i { color: #ffd36b; }
.hub-stage-btn { cursor: pointer; }
.hub-stage-btn:hover, .hub-stage-btn:focus-visible { border-color: #ffd36b; color: #fff; }
.hub-stage-studio { position: absolute; right: 12px; bottom: 12px; z-index: 2; }
.hub-stage--set .hub-stage-studio { top: 12px; bottom: auto; }
/* whole set: the game pieces as a strip along the bottom, a set without avatar pieces as a gallery */
.hub-set-strip { position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 2; display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 16px; background: rgba(10, 6, 28, .72); border: 1px solid rgba(255, 255, 255, .14); overflow: hidden; }
.hub-set-strip-label { color: #d3cdea; font-size: .74rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; margin-right: 2px; white-space: nowrap; }
.hub-set-piece { position: relative; flex: 0 0 auto; width: 56px; height: 56px; padding: 0; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .18); background: rgba(255, 255, 255, .06); overflow: hidden; cursor: pointer; display: grid; place-items: center; color: #f6efe0; font: inherit; font-weight: 900; }
.hub-set-piece-art { width: 100%; height: 100%; display: grid; place-items: center; }
.hub-set-piece:not(.is-owned) .hub-set-piece-art { opacity: .78; }
.hub-set-piece.is-current { border-color: #ffd36b; box-shadow: 0 0 0 2px #ffd36b; }
.hub-set-piece:hover, .hub-set-piece:focus-visible { border-color: #ffd36b; }
.hub-set-piece-own { position: absolute; right: 3px; top: 3px; color: #5fe3a1; font-size: .8rem; filter: drop-shadow(0 1px 1px #000); }
.hub-set-piece--more { background: rgba(255, 255, 255, .1); }
.hub-set-gallery { width: 100%; max-height: 100%; overflow: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 10px; align-content: start; align-content: safe center; padding: 4px; scrollbar-width: thin; }
.hub-set-gallery .hub-set-piece { width: 100%; height: auto; aspect-ratio: 1; }
.hub-stage--set .hub-stage-main:has(> .hub-set-gallery) { grid-template-rows: minmax(0, 1fr) auto; gap: 10px; }
.hub-stage--set .hub-stage-main:has(> .hub-set-gallery) > .hub-stage-tools { position: static; justify-self: center; }

/* tags: chips in the window, matched tags on cards while searching (hub-tags.js) */
.hub-tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-width: 0; }
.hub-tag { padding: 3px 10px; min-height: 28px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg-2); color: var(--muted); font: inherit; font-size: .76rem; font-weight: 800; cursor: pointer; }
.hub-tag:hover, .hub-tag:focus-visible { border-color: var(--gold); color: var(--text); }
.hub-tag.is-match { background: var(--gold); color: var(--on-gold); border-color: transparent; }
.hub-tag-more { color: var(--muted); font-size: .76rem; font-weight: 800; }
.hub-item-tags { margin-top: 6px; gap: 4px; }
.hub-item-tags .hub-tag { min-height: 24px; padding: 1px 8px; font-size: .72rem; }
.hub-preview-set .hub-link { margin-left: auto; white-space: nowrap; }

/* missing set pieces in the window: one short row (hub-sets.js bar, missing: 'row') */
.hub-setbar-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.hub-setbar-row-label { color: var(--muted); font-size: .76rem; font-weight: 800; margin-right: 2px; }
.hub-setbar-chip { width: 44px; height: 44px; padding: 0; border-radius: 10px; border: 1px dashed var(--line-2); background: var(--bg-2); overflow: hidden; display: grid; place-items: center; cursor: pointer; color: var(--text); font: inherit; font-weight: 900; font-size: .8rem; }
.hub-setbar-chip > * { max-width: 100%; max-height: 100%; }
/* the Missing chips draw the whole-set grid's 84px thumbnail (same renderer, same crop) and scale it into the chip,
   centred on both axes (44px chip, 1px border: 42 / 84 = .5) */
.hub-setbar-chip { position: relative; }
.hub-setbar-chip > .hub-setbar-chip-art { position: absolute; left: 50%; top: 50%; width: 84px; height: 84px; max-width: none; max-height: none; transform: translate(-50%, -50%) scale(.5); pointer-events: none; display: grid; place-items: center; }
.hub-setbar-chip-art > .hub-set-piece-art { width: 84px; height: 84px; overflow: hidden; }
/* reactions / effects in the set tiles: the tile fills the square and the sticker is bigger */
.hub-set-piece-art .idfx-tile { width: 100%; height: 100%; min-height: 0; aspect-ratio: auto; border-radius: 0; }
.hub-set-piece-art .idfx-tile img { width: 60%; max-width: none; }
/* name plates in the set tiles: a smaller plate that fits the square (the name trims with an ellipsis) */
.hub-set-piece-art .hub-pv-frame { width: 100%; overflow: hidden; justify-items: center; }
.hub-set-piece-art .hub-pv-frame .idf[class] { font-size: 7px; max-width: 94%; min-width: 0; }
.hub-set-piece-art .hub-pv-frame .idf-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* quick chats in the set tiles: a smaller bubble that fits the square, whole words only, at most four lines */
.hub-set-piece-art .hub-pv-chat { width: 100%; height: 100%; padding: 7px 3px; box-sizing: border-box; overflow: hidden; }
.hub-set-piece-art .hub-pv-chat .idc--static { font-size: .55rem; max-width: 100%; margin-bottom: 0; padding: .45em .5em; line-height: 1.2; }
.hub-set-piece-art .hub-pv-chat .idc-text { overflow-wrap: normal; word-break: normal; hyphens: none; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.hub-setbar-chip:hover, .hub-setbar-chip:focus-visible { border-color: var(--gold); border-style: solid; }
