/* Game District: dress-up studio (Avatar tab).  Motion is switched off by body[data-motion="reduced"] (hub-base.css). */

.dz { display: grid; gap: 22px; }
.dz-head .dz-savebar { align-self: center; }
.dz-layout { display: grid; grid-template-columns: minmax(300px, 440px) minmax(0, 1fr); gap: 22px; align-items: start; }
.dz-left { position: sticky; top: calc(var(--top-real, var(--top-h)) + 12px); display: grid; gap: 12px; min-width: 0; }
.dz-right { min-width: 0; display: grid; gap: 12px; }

/* ------------------------------------------------------------- stage */
.dz-stage {
    --aura: transparent; position: relative; aspect-ratio: 4 / 5; border-radius: 26px; overflow: hidden; isolation: isolate;
    border: 1px solid var(--line-2); background: radial-gradient(90% 70% at 50% 30%, #45397f, #1c1642);
    box-shadow: var(--shadow), 0 0 0 1px rgba(255, 255, 255, .04) inset, 0 0 46px var(--aura);
    transition: box-shadow .4s;
}
.dz-stage[data-aura="rare"] { --aura: rgba(93, 180, 255, .22); }
.dz-stage[data-aura="epic"] { --aura: rgba(185, 139, 255, .38); }
.dz-stage[data-aura="legendary"] { --aura: rgba(255, 187, 69, .5); }
.dz-stage[data-aura="mythic"] { --aura: rgba(255, 95, 152, .55); }
.dz-stage:focus-visible { outline-offset: 4px; }
.dz-stage::before {
    content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: .8;
    background:
        radial-gradient(2px 2px at 12% 18%, #fff, transparent 60%), radial-gradient(1.5px 1.5px at 82% 12%, #ffe9a8, transparent 60%),
        radial-gradient(2px 2px at 70% 40%, #fff, transparent 60%), radial-gradient(1.5px 1.5px at 24% 62%, #bfe8ff, transparent 60%),
        radial-gradient(2px 2px at 90% 72%, #fff, transparent 60%), radial-gradient(1.5px 1.5px at 8% 86%, #ffd1ec, transparent 60%);
    animation: dzTwinkle 4.5s ease-in-out infinite;
}
@keyframes dzTwinkle { 50% { opacity: .35; } }
.dz-stage.is-drop { outline: 3px dashed var(--gold); outline-offset: -8px; }
.dz-droptip { position: absolute; z-index: 6; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(.9); padding: 10px 18px; border-radius: 999px; background: var(--gold); color: var(--on-gold); font-weight: 900; opacity: 0; pointer-events: none; transition: opacity .15s, transform .15s; display: flex; gap: 8px; align-items: center; }
.dz.is-dragging .dz-droptip { opacity: .0; }
.dz-stage.is-drop .dz-droptip { opacity: 1; transform: translate(-50%, -50%) scale(1); }

.dz-scene, .dz-figure { position: absolute; inset: 0; }
.dz-scene { z-index: 0; }
.dz-scene svg, .dz-figure-inner svg { display: block; width: 100%; height: 100%; }
.dz-scene .ek-fig { display: none; }
.dz-stage.is-flat .dz-figure { display: none; }
.dz-stage.is-flat .dz-scene .ek-fig { display: inline; }
.dz-floor { position: absolute; z-index: 2; left: 22%; right: 22%; bottom: 3.5%; height: 7%; border-radius: 50%; background: radial-gradient(closest-side, rgba(0, 0, 0, .5), transparent); animation: dzFloor 3.4s ease-in-out infinite; }
@keyframes dzFloor { 50% { transform: scale(.92); opacity: .8; } }
.dz-figure { z-index: 3; transform: scaleX(var(--turn, 1)); transform-origin: 50% 90%; pointer-events: none; }
.dz-figure-inner { position: absolute; inset: 0; transform-origin: 50% 96%; animation: dzBob 3.4s ease-in-out infinite; }
@keyframes dzBob { 0%, 100% { transform: translateY(0) rotate(0); } 25% { transform: translateY(-1.1%) rotate(.5deg); } 50% { transform: translateY(0) rotate(0); } 75% { transform: translateY(-.8%) rotate(-.5deg); } }
.dz-figure.is-pop .dz-figure-inner { animation: dzPop .55s cubic-bezier(.2, .9, .3, 1.2), dzBob 3.4s ease-in-out .55s infinite; }
@keyframes dzPop { 0% { transform: scale(1, 1); } 22% { transform: scale(1.1, .88); } 48% { transform: scale(.94, 1.1) translateY(-3%); } 72% { transform: scale(1.03, .98); } 100% { transform: scale(1, 1); } }
.dz-figure.is-turn { animation: dzTurn .5s ease; }
@keyframes dzTurn { from { transform: scaleX(calc(var(--turn, 1) * -1)); } 50% { transform: scaleX(.02); } to { transform: scaleX(var(--turn, 1)); } }
.dz-figure.is-shuffle .dz-figure-inner { animation: dzShake .09s linear infinite; }
@keyframes dzShake { 0% { transform: translate(-1.2%, 0) rotate(-1.5deg); } 50% { transform: translate(1.2%, -1%) rotate(1.5deg); } 100% { transform: translate(-1.2%, 0) rotate(-1.5deg); } }
.dz-stage.is-compare .dz-figure-inner { animation: none; filter: saturate(.85); }

.dz-sparks { position: absolute; inset: 0; z-index: 5; pointer-events: none; overflow: hidden; }
.dz-spark {
    position: absolute; width: var(--s, 8px); height: var(--s, 8px); margin: calc(var(--s, 8px) / -2) 0 0 calc(var(--s, 8px) / -2); background: var(--c, #ffc94a);
    clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); animation: dzSpark .85s cubic-bezier(.15, .8, .3, 1) forwards;
    filter: drop-shadow(0 0 4px var(--c, #ffc94a));
}
@keyframes dzSpark { 0% { transform: translate(0, 0) scale(.3) rotate(0); opacity: 1; } 60% { opacity: 1; } 100% { transform: translate(var(--dx), var(--dy)) scale(1.1) rotate(160deg); opacity: 0; } }

.dz-bubble {
    position: absolute; z-index: 7; left: 50%; top: 5%; max-width: 86%; padding: 8px 14px; border-radius: 18px; background: #fff8e8; color: #3a2414;
    font-weight: 900; font-size: .88rem; text-align: center; transform: translate(-50%, -8px) scale(.85); opacity: 0; pointer-events: none; box-shadow: 0 6px 16px rgba(0, 0, 0, .35);
}
.dz-bubble::after { content: ''; position: absolute; left: 50%; bottom: -7px; width: 14px; height: 14px; background: inherit; transform: translateX(-50%) rotate(45deg); border-radius: 3px; }
.dz-bubble.is-on { animation: dzBubble 3.2s ease forwards; }
@keyframes dzBubble { 0% { opacity: 0; transform: translate(-50%, 6px) scale(.8); } 10% { opacity: 1; transform: translate(-50%, 0) scale(1.04); } 16% { transform: translate(-50%, 0) scale(1); } 85% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -8px) scale(.96); } }
.dz-badge { position: absolute; z-index: 6; top: 12px; padding: 3px 12px; border-radius: 999px; font-size: .74rem; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.dz-badge-before { left: 12px; background: var(--cyan); color: #04202a; opacity: 0; transition: opacity .15s; }
.dz-stage.is-compare .dz-badge-before { opacity: 1; }
.dz-badge-try { right: 12px; background: var(--pink); color: #fff; animation: dzPulse 1.6s ease-in-out infinite; }
@keyframes dzPulse { 50% { transform: scale(1.08); } }
.dz-rating { position: absolute; z-index: 6; left: 12px; bottom: 12px; }
.dz-score { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: rgba(10, 6, 28, .78); color: #fff; font-weight: 900; backdrop-filter: blur(6px); border: 1px solid rgba(255, 255, 255, .2); }
.dz-score i { color: var(--gold); }
.dz-score b { font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.dz-score small { color: #cfc8ee; font-weight: 800; }
.dz-score.is-mid { border-color: var(--cyan); }
.dz-score.is-top { border-color: var(--gold); box-shadow: 0 0 14px rgba(255, 201, 74, .55); }

/* ------------------------------------------------------------- tools and tray */
.dz-tools { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; }
.dz-tool { width: 46px; height: 46px; display: inline-grid; place-items: center; border-radius: 16px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text); font-size: 1.15rem; cursor: pointer; transition: transform .14s, background .14s, border-color .14s; }
.dz-tool:hover:not(:disabled) { background: var(--surface-3); border-color: var(--gold); transform: translateY(-2px) rotate(-3deg); }
.dz-tool:active:not(:disabled) { transform: scale(.92); }
.dz-tool:disabled { opacity: .4; cursor: default; }
.dz-tool.is-on, .dz-tool[aria-pressed="true"] { background: var(--cyan); color: #04202a; border-color: transparent; }
.dz-tool[data-dz-act="random"]:hover:not(:disabled) i { animation: dzDice .5s ease; }
@keyframes dzDice { 0% { transform: rotate(0); } 100% { transform: rotate(360deg); } }
.dz-sep { width: 1px; height: 28px; background: var(--line-2); margin: 0 4px; }

/* try-on tray: see "try-on tray" below */

.dz-savebar-in { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.dz-savestate { display: inline-flex; gap: 6px; align-items: center; font-weight: 800; font-size: .85rem; color: var(--muted); }
.dz-savebar-in.is-dirty .dz-savestate { color: var(--gold); }
.dz-save:not(:disabled) { animation: dzSavePulse 2.2s ease-in-out infinite; }
@keyframes dzSavePulse { 50% { box-shadow: 0 4px 0 rgba(0, 0, 0, .28), 0 0 0 6px color-mix(in srgb, var(--gold) 30%, transparent); } }

/* ------------------------------------------------------------- wardrobe */
/* category rail: see "category navigation" below */
.dz-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.dz-filters:empty { display: none; }
.dz-seg button { padding: 6px 14px; min-height: 36px; font-size: .84rem; flex: 0 1 auto; }
.dz-search { position: relative; flex: 1 1 160px; max-width: 260px; }
.dz-search i { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--dim); pointer-events: none; }
.dz-search input { padding-left: 34px !important; min-height: 38px !important; }
.dz-body { min-width: 0; padding: 14px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); min-height: 320px; }
.dz-grid-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.dz-grid-head strong { font-family: var(--font-display); font-weight: 400; font-size: 1.1rem; }
.dz-grid-head small { color: var(--muted); font-weight: 800; }
.dz-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(106px, 1fr)); gap: 12px; }
.dz-item { position: relative; display: grid; gap: 4px; justify-items: center; min-width: 0; }
.dz-thumb {
    position: relative; width: 100%; aspect-ratio: 1; display: grid; place-items: center; padding: 8px; border-radius: 18px; overflow: hidden; cursor: pointer;
    border: 2px solid color-mix(in srgb, var(--rar, var(--rar-common)) 45%, var(--line)); background: radial-gradient(90% 90% at 50% 25%, color-mix(in srgb, var(--rar, #444) 20%, var(--surface-3)), var(--bg-2));
    transition: transform .15s cubic-bezier(.3, 1.6, .5, 1), border-color .15s, box-shadow .15s;
}
.dz-item.is-scene .dz-thumb { padding: 0; }
.dz-thumb:hover { transform: translateY(-4px) scale(1.05) rotate(-1deg); border-color: var(--rar, var(--gold)); box-shadow: 0 10px 22px rgba(0, 0, 0, .4), 0 0 18px color-mix(in srgb, var(--rar, transparent) 40%, transparent); }
.dz-thumb:active { transform: scale(.94); }
.dz-item.is-worn .dz-thumb { border-color: var(--green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 35%, transparent); }
.dz-item.is-locked .dz-art { filter: saturate(.7) brightness(.92); }
.dz-art { display: grid; place-items: center; width: 100%; height: 100%; }
.dz-art > * { max-width: 100%; max-height: 100%; }
.dz-art svg { width: 100%; height: 100%; }
.dz-item.is-scene .dz-art .dashboard-mini-avatar-bg { width: 100%; height: 100%; border-radius: 0; }
.dz-none .dz-art { color: var(--dim); font-size: 1.6rem; }
.dz-name { max-width: 100%; font-size: .74rem; font-weight: 800; line-height: 1.2; color: var(--muted); text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dz-item.is-worn .dz-name { color: var(--text); }
.dz-price { font-size: .76rem; }
.dz-price.is-short { opacity: .75; }
.dz-pill { position: absolute; left: 6px; top: 6px; display: inline-flex; align-items: center; gap: 3px; padding: 1px 7px; border-radius: 999px; font-size: .62rem; font-weight: 900; background: rgba(8, 5, 20, .82); color: #fff; }
.dz-pill.is-worn { background: var(--green); color: #052a17; }
.dz-pill.is-try { background: var(--pink); color: #fff; }
.dz-pill.is-lock { color: var(--gold); }
.dz-fav { position: absolute; right: 4px; top: 4px; z-index: 2; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(8, 5, 20, .7); color: #fff; cursor: pointer; opacity: 0; transition: opacity .15s, transform .15s; font-size: .8rem; }
.dz-item:hover .dz-fav, .dz-fav:focus-visible, .dz-fav.is-on { opacity: 1; }
.dz-fav.is-on { color: var(--gold); }
.dz-fav:hover { transform: scale(1.2); }
.dz-shine { position: absolute; inset: 0; pointer-events: none; opacity: 0; }
.dashboard-rarity--epic .dz-shine, .dashboard-rarity--legendary .dz-shine, .dashboard-rarity--mythic .dz-shine { opacity: 1; background: linear-gradient(115deg, transparent 38%, rgba(255, 255, 255, .28) 50%, transparent 62%); background-size: 260% 100%; background-position: 160% 0; animation: dzShine 4.6s ease-in-out infinite; }
.dashboard-rarity--legendary .dz-shine { animation-duration: 3.6s; } .dashboard-rarity--mythic .dz-shine { animation-duration: 3s; }
@keyframes dzShine { 0%, 40% { background-position: 160% 0; } 80%, 100% { background-position: -60% 0; } }
.dz-empty { display: grid; place-items: center; gap: 10px; text-align: center; padding: 34px 14px; color: var(--muted); }
.dz-empty i { font-size: 2.2rem; color: var(--dim); }

.dz-colors { display: grid; gap: 16px; }
.dz-model { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-weight: 900; }
.dz-colorset { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; min-width: 0; }
.dz-colorset legend { padding: 0 0 6px; font-size: .74rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.dz-swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.dz-swatch { position: relative; width: 38px; height: 38px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .35); background: var(--sw); cursor: pointer; transition: transform .14s cubic-bezier(.3, 1.6, .5, 1); box-shadow: 0 3px 0 rgba(0, 0, 0, .3); padding: 0; display: inline-grid; place-items: center; }
.dz-swatch:hover { transform: scale(1.18); }
.dz-swatch[aria-pressed="true"] { outline: 3px solid var(--gold); outline-offset: 2px; transform: scale(1.1); }
.dz-swatch-custom { background: conic-gradient(#f66, #fd5, #6e6, #5df, #66f, #f6f, #f66); color: #fff; }
.dz-swatch-custom input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; border: 0; padding: 0; }
.dz-swatch-custom i { pointer-events: none; text-shadow: 0 1px 2px #000; }

.dz-portrait { display: grid; gap: 14px; }
.dz-crop-layout { display: grid; grid-template-columns: minmax(0, 340px) 1fr; gap: 18px; align-items: start; }
.dz-crop-stage { position: relative; aspect-ratio: 1; border-radius: 16px; overflow: hidden; touch-action: none; cursor: var(--gcur-crosshair, default); background: var(--bg-2); border: 1px solid var(--line-2); }
.dz-crop-stage svg { width: 100%; height: 100%; display: block; }
.dz-crop-stage .dashboard-avatar-crop-box { position: absolute; left: var(--crop-x); top: var(--crop-y); width: var(--crop-w); height: var(--crop-h); border: 2px solid var(--cyan); box-shadow: 0 0 0 999px rgba(5, 3, 14, .55); border-radius: 4px; cursor: var(--gcur-move, pointer); }
.dz-crop-side { display: grid; gap: 12px; justify-items: start; }
.dz-crop-preview { width: 110px; height: 110px; border-radius: 50%; overflow: hidden; border: 4px solid var(--gold); background: #f3d89d; }
.dz-crop-preview svg { width: 100%; height: 100%; display: block; }
.dz-zoom { display: grid; gap: 4px; width: 100%; font-size: .74rem; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }

/* ------------------------------------------------------------- saved looks */
.dz-looks { padding: 16px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); display: grid; gap: 12px; }
.dz-looks-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.dz-looks-head h3 { font-family: var(--font-display); font-weight: 400; font-size: 1.1rem; }
.dz-looks-head small { color: var(--muted); font-weight: 700; }
.dz-looks-row { display: flex; gap: 12px; overflow-x: auto; padding: 4px 2px 10px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.dz-look { position: relative; flex: 0 0 132px; scroll-snap-align: start; display: grid; gap: 6px; padding: 8px; border-radius: 18px; background: var(--bg-2); border: 1px solid var(--line); transition: transform .15s, border-color .15s; }
.dz-look:hover { transform: translateY(-3px); border-color: var(--gold); }
.dz-look.is-current { border-color: var(--green); box-shadow: 0 0 0 2px color-mix(in srgb, var(--green) 35%, transparent); }
.dz-look-main { display: grid; gap: 6px; border: 0; background: transparent; color: var(--text); cursor: pointer; text-align: center; padding: 0; }
.dz-look-art { display: block; aspect-ratio: 4 / 5; border-radius: 12px; overflow: hidden; background: #3b3172; }
.dz-look-art svg { width: 100%; height: 100%; display: block; }
.dz-look-main strong { font-size: .84rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dz-look-main em { font-style: normal; font-size: .68rem; font-weight: 900; color: var(--green); }
.dz-look-menu { position: absolute; right: 6px; top: 6px; }
.dz-look-menu summary { list-style: none; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: rgba(8, 5, 20, .75); color: #fff; cursor: pointer; }
.dz-look-menu summary::-webkit-details-marker { display: none; }
.dz-look-pop { position: absolute; right: 0; top: 34px; z-index: 20; width: 180px; display: grid; padding: 6px; border-radius: 14px; background: var(--surface-3); border: 1px solid var(--line-2); box-shadow: var(--shadow); }
.dz-look-pop button { text-align: left; padding: 8px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--text); font-weight: 800; font-size: .84rem; cursor: pointer; }
.dz-look-pop button:hover { background: var(--gold); color: var(--on-gold); }
.dz-look-pop .is-danger:hover { background: var(--red); color: #fff; }
.dz-look-new { flex-basis: 170px; align-content: start; justify-items: stretch; border-style: dashed; }
.dz-look-plus { display: grid; place-items: center; font-size: 2rem; color: var(--dim); background: var(--surface-2); }
.dz-look-new input { min-height: 38px; }
.dz-look-new .retro-button-secondary { min-height: 36px; font-size: .8rem; padding: 4px 8px; }

.dz-mini { position: fixed; z-index: 60; left: 14px; bottom: 14px; width: 74px; height: 92px; padding: 0; border-radius: 18px; overflow: hidden; border: 3px solid var(--gold); background: #3b3172; box-shadow: var(--shadow); cursor: pointer; animation: hubPop .25s ease; }
.dz-mini svg { width: 100%; height: 100%; display: block; }
.dz-mini[hidden] { display: none; }

/* ------------------------------------------------------------- responsive */
@media (max-width: 1100px) {
    .dz-layout { grid-template-columns: 1fr; }
    .dz-left { position: static; }
    .dz-stage { width: min(100%, 360px); margin: 0 auto; }
}
@media (max-width: 640px) {
    .dz-grid { grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 9px; }
    .dz-crop-layout { grid-template-columns: 1fr; }
    .dz-tool { width: 42px; height: 42px; }
    .dz-head .dz-savebar { width: 100%; }
    .dz-savebar-in { justify-content: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
    body[data-motion="auto"] .dz-figure-inner, body[data-motion="auto"] .dz-stage::before, body[data-motion="auto"] .dz-shine { animation: none !important; }
}
body[data-motion="reduced"] .dz-figure-inner, body[data-motion="reduced"] .dz-stage::before, body[data-motion="reduced"] .dz-shine, body[data-motion="reduced"] .dz-floor { animation: none !important; }

/* fit the stage and its tool row on a laptop screen */
.dz-stage { width: min(100%, calc((100vh - 270px) * .8)); min-width: 280px; margin: 0 auto; }
.dz-head { margin-bottom: 0; }
.dz { gap: 16px; }
.dz-bubble { font-size: .8rem; padding: 6px 12px; top: 3%; }
@media (max-height: 760px) and (min-width: 1101px) { .dz-stage { width: min(100%, calc((100vh - 250px) * .8)); } }

.dz-looks-row { align-items: flex-start; }
.dz-look-new input { width: 100%; }

/* tablets (stacked layout, no phone drawer): the stage becomes a compact sticky strip under the top bar so it stays on screen while the item list scrolls */
@media (min-width: 641px) and (max-width: 1100px) {
    html:not(.hub-phone) .dz-left { position: sticky; top: calc(var(--top-real, var(--top-h)) + 6px); z-index: 30; display: flex; gap: 12px; justify-content: center; align-items: flex-start; padding: 4px 0 8px; background: linear-gradient(var(--bg) 82%, transparent); }
    html:not(.hub-phone) .dz-stage { width: auto; height: clamp(220px, 34vh, 380px); aspect-ratio: 4 / 5; margin: 0; flex: 0 1 auto; }
    html:not(.hub-phone) .dz-tools { display: grid; grid-template-columns: repeat(2, 46px); gap: 6px; align-content: start; }
    html:not(.hub-phone) .dz-sep { display: none; }
    html:not(.hub-phone) .dz-mini { display: none !important; }
}

/* Wardrobe view: slot cards */
.dz-wardrobe { display: grid; gap: 12px; }
.dz-wardrobe-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; color: var(--muted); font-weight: 800; font-size: .86rem; }
.dz-wardrobe-head strong { color: var(--text); } .dz-wardrobe-head em { color: var(--gold); font-style: normal; }
.dz-slotgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; }
.dz-slotcard { position: relative; }
.dz-slotcard-main { width: 100%; display: grid; gap: 4px; justify-items: center; text-align: center; padding: 8px 6px 10px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); font: inherit; cursor: pointer; min-height: 44px; }
.dz-slotcard.is-empty .dz-slotcard-main { border-style: dashed; }
.dz-slotcard.is-filled .dz-slotcard-main { border-color: var(--rar, var(--line-2)); }
.dz-slotcard.is-changed .dz-slotcard-main { box-shadow: 0 0 0 2px color-mix(in srgb, var(--gold) 60%, transparent) inset; }
.dz-slotcard-main:hover, .dz-slotcard-main:focus-visible { border-color: var(--gold); outline: none; }
.dz-slotcard-art { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 12px; background: rgba(0, 0, 0, .25); overflow: hidden; color: var(--dim); font-size: 1.6rem; }
.dz-slotcard-art > * { max-width: 100%; max-height: 100%; }
.dz-slotcard-label { display: inline-flex; gap: 5px; align-items: center; font-size: .7rem; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.dz-slotcard-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }
.dz-slotcard-name { font-size: .8rem; line-height: 1.15; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dz-slotcard-state { color: var(--dim); font-weight: 800; font-size: .68rem; }
.dz-slotcard-off { position: absolute; top: -6px; right: -6px; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--surface-3); color: var(--text); cursor: pointer; display: grid; place-items: center; }
.dz-slotcard-off:hover { background: var(--red); color: #fff; }
.hub-phone .dz-slotgrid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
.hub-phone .dz-slotcard-off { width: 44px; height: 44px; top: -10px; right: -10px; }

@media (min-width: 641px) and (max-width: 1100px) {
    /* the sticky strip pins to the bottom of the studio at the end of the scroll: leave room so it never covers the last items */
    html:not(.hub-phone) .dz-right { padding-bottom: calc(clamp(220px, 34vh, 380px) + 12px); }
}

/* ------------------------------------------------------------- category navigation
 * Desktop and tablets: a vertical rail of grouped categories beside the items (grid areas, the DOM order stays try / tabs / filters / body).
 * Phones: one "current category" button with previous / next, the same groups open as a bottom sheet. Never a sideways scroller. */
html:not(.hub-phone) .dz-right { grid-template-columns: 196px minmax(0, 1fr); grid-template-rows: auto auto 1fr; grid-template-areas: "try try" "cats filters" "cats body"; align-items: start; column-gap: 14px; }
html:not(.hub-phone) .dz-try { grid-area: try; }
html:not(.hub-phone) .dz-tabs { grid-area: cats; position: sticky; top: calc(var(--top-real, var(--top-h)) + 12px); max-height: calc(100vh - var(--top-real, var(--top-h)) - 24px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; border-radius: 20px; }
html:not(.hub-phone) .dz-filters { grid-area: filters; }
html:not(.hub-phone) .dz-body { grid-area: body; }
.dz-tabs { min-width: 0; }
.dz-catbar, .dz-catback, .dz-catsheet-head { display: none; }
.dz-cats { display: grid; gap: 8px; padding: 8px 8px 10px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); }
.dz-catgroup { display: grid; gap: 2px; }
.dz-catgroup-label { padding: 2px 8px 3px; font-size: .66rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }
.dz-tab {
    position: relative; display: flex; align-items: center; gap: 8px; width: 100%; min-height: 32px; padding: 4px 10px; border-radius: 11px; border: 1px solid transparent;
    background: transparent; color: var(--muted); font: inherit; font-weight: 800; font-size: .86rem; line-height: 1.2; text-align: left; cursor: pointer; transition: background .14s, color .14s, border-color .14s;
}
.dz-tab > i { flex: 0 0 18px; text-align: center; }
.dz-tab-label { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dz-tab em { flex: 0 0 auto; font-style: normal; font-size: .7rem; font-weight: 900; opacity: .8; font-variant-numeric: tabular-nums; }
.dz-tab:hover { color: var(--text); background: var(--surface-2); border-color: var(--line); }
.dz-tab.is-active { background: var(--gold); color: var(--on-gold); border-color: transparent; box-shadow: 0 3px 10px rgba(255, 157, 46, .28); }
.dz-tab-dot { position: absolute; left: 3px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: transparent; }
.dz-tab.is-worn .dz-tab-dot { background: var(--green); box-shadow: 0 0 6px var(--green); }
.dz-tab.is-changed .dz-tab-dot { background: var(--gold); box-shadow: 0 0 6px var(--gold); }
.dz-tab.is-active .dz-tab-dot { background: var(--on-gold); box-shadow: none; opacity: .55; }
.dz-tab.is-active:not(.is-worn):not(.is-changed) .dz-tab-dot { opacity: 0; }

/* phones (and landscape phones): the current category + a sheet with every group */
.hub-phone .dz-tabs { flex: 0 0 auto; }
.hub-phone .dz-catbar { display: flex; gap: 6px; align-items: stretch; }
.dz-catbtn {
    flex: 1 1 auto; min-width: 0; min-height: 44px; display: flex; align-items: center; gap: 10px; padding: 4px 12px; border-radius: 14px;
    border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text); font: inherit; font-weight: 800; text-align: left; cursor: pointer;
}
.dz-catbtn > i:first-child { color: var(--gold); font-size: 1.05rem; }
.dz-catbtn-copy { flex: 1 1 auto; min-width: 0; display: grid; line-height: 1.1; }
.dz-catbtn-copy small { font-size: .66rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.dz-catbtn-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dz-catbtn em { font-style: normal; font-size: .76rem; font-weight: 900; color: var(--muted); font-variant-numeric: tabular-nums; }
.dz-catbtn-chev { transition: transform .2s; }
.dz-catbtn[aria-expanded="true"] .dz-catbtn-chev { transform: rotate(180deg); }
.dz-catstep { flex: 0 0 44px; min-height: 44px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; }
.dz-catstep:hover, .dz-catbtn:hover { border-color: var(--gold); }
.hub-phone .dz-catsheet { display: none; }
.hub-phone .dz-tabs.is-open .dz-catback { display: block; position: fixed; inset: 0; z-index: 70; background: rgba(6, 4, 16, .55); }
.hub-phone .dz-tabs.is-open .dz-catsheet {
    display: grid; gap: 8px; position: fixed; z-index: 71; left: 0; right: 0; bottom: var(--nav-h, 0px); max-height: calc(100dvh - var(--top-h) - var(--nav-h, 0px) - 12px); overflow-y: auto; overscroll-behavior: contain;
    padding: 12px 12px 14px; background: var(--surface); border: 1px solid var(--line-2); border-bottom: 0; border-radius: 22px 22px 0 0; box-shadow: 0 -12px 34px rgba(0, 0, 0, .45); animation: hubPop .2s ease;
}
/* landscape phones: the main nav is a side rail (z 130), so the sheet and its backdrop go over it, from the top bar down */
.hub-land .dz-tabs.is-open .dz-catback { z-index: 140; }
.hub-land .dz-tabs.is-open .dz-catsheet { z-index: 141; bottom: 0; max-height: calc(100dvh - var(--top-h) - 8px); padding-bottom: calc(14px + var(--safe-b, 0px)); }
html.hub-land .dz-cats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; align-items: start; }
.hub-phone .dz-catsheet-head { display: flex; align-items: center; justify-content: space-between; padding: 0 2px; }
.hub-phone .dz-catsheet-head strong { font-family: var(--font-display); font-weight: 400; font-size: 1.05rem; }
.hub-phone .dz-catsheet-head .dz-x { width: 44px; height: 44px; }
.hub-phone .dz-cats { padding: 0; border: 0; background: none; gap: 8px; }
.hub-phone .dz-catgroup { grid-template-columns: repeat(auto-fill, minmax(66px, 1fr)); gap: 6px; }
.hub-phone .dz-catgroup-label { grid-column: 1 / -1; padding: 0 2px; }
.hub-phone .dz-tab { min-height: 58px; flex-direction: column; justify-content: center; gap: 1px; padding: 5px 3px; text-align: center; border-color: var(--line); background: var(--surface-2); font-size: .74rem; line-height: 1.1; }
.hub-phone .dz-tab-label { white-space: normal; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.hub-phone .dz-tab > i { flex: none; font-size: 1.05rem; }
.hub-phone .dz-tab-label { max-width: 100%; }
.hub-phone .dz-tab.is-active { border-color: transparent; background: var(--gold); }
.hub-phone .dz-tab-dot { left: auto; right: 6px; top: 6px; margin-top: 0; }

/* ------------------------------------------------------------- try-on tray
 * Each row is a grid: art | name (cut with an ellipsis) | price (never cut, tabular figures) | remove. The total row shares the price column. */
.dz-try { display: grid; gap: 8px; padding: 12px 14px; border-radius: 16px; background: color-mix(in srgb, var(--pink) 12%, var(--surface)); border: 1px dashed var(--pink); min-width: 0; }
.dz-try-head { display: flex; gap: 8px; align-items: center; color: var(--pink); min-width: 0; }
.dz-try-head strong { white-space: nowrap; }
.dz-try-sum { margin-left: auto; display: inline-flex; gap: 6px; align-items: center; color: var(--muted); font-weight: 800; font-size: .84rem; white-space: nowrap; }
.dz-try-toggle { display: none; align-items: center; gap: 4px; min-height: 32px; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text); font: inherit; font-weight: 800; font-size: .78rem; cursor: pointer; }
.dz-try-toggle i { transition: transform .2s; }
.dz-try.is-open .dz-try-toggle i { transform: rotate(180deg); }
.dz-try-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 4px 22px; min-width: 0; }
.dz-try-total { grid-column: 1 / -1; }
html:not(.hub-phone) .dz-try-sum { display: none; }
.dz-try-row { display: grid; grid-template-columns: 30px minmax(0, 1fr) max-content 30px; align-items: center; gap: 10px; min-height: 32px; font-weight: 800; font-size: .88rem; }
.dz-try-art { width: 30px; height: 30px; border-radius: 8px; overflow: hidden; display: grid; place-items: center; background: rgba(0, 0, 0, .22); }
.dz-try-art > * { max-width: 100%; max-height: 100%; }
.dz-try-total .dz-try-art { background: none; }
.dz-try-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dz-try-price { justify-self: end; white-space: nowrap; font-variant-numeric: tabular-nums; }
.dz-try-price .dashboard-coin-amount { white-space: nowrap; font-variant-numeric: tabular-nums; }
.dz-try-total { border-top: 1px dashed color-mix(in srgb, var(--pink) 55%, transparent); padding-top: 6px; margin-top: 2px; }
.dz-try-total .dz-try-name { color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-size: .74rem; }
.dz-x { width: 30px; height: 30px; border-radius: 8px; border: 0; background: var(--surface-3); color: var(--text); cursor: pointer; display: grid; place-items: center; padding: 0; }
.dz-x:hover { background: var(--red); color: #fff; }
.dz-try-buy { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.dz-try-wallet { display: inline-flex; gap: 6px; align-items: center; font-weight: 800; font-size: .84rem; color: var(--muted); flex-wrap: wrap; }
.dz-try-wallet.is-short { color: var(--red); }
.dz-num { font-variant-numeric: tabular-nums; }
/* phones: the head row (count, total, Show list) and the buy row; the list folds out on demand so the drawer keeps room for items */
.hub-phone .dz-try { flex: 0 0 auto; max-height: 46%; overflow-y: auto; padding: 8px 10px; gap: 6px; }
.hub-phone .dz-try-toggle { display: inline-flex; min-height: 40px; }
.hub-phone .dz-try:not(.is-open) .dz-try-list { display: none; }
.hub-phone .dz-try-row { grid-template-columns: 30px minmax(0, 1fr) max-content 44px; }
.hub-phone .dz-try-row .dz-x { width: 44px; height: 40px; }
.hub-phone .dz-try-buy { flex-wrap: nowrap; }
.hub-phone .dz-try-wallet { flex: 1 1 auto; min-width: 0; font-size: .8rem; }
.hub-phone .dz-try-buy .retro-button { min-height: 44px; flex: 0 0 auto; }
/* the head fits one line at 390: the toggle is a round chevron button (its "Show list" text stays for screen readers) */
.hub-phone .dz-try-head { gap: 6px; }
.hub-phone .dz-try-head strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.hub-phone .dz-try-toggle { order: 3; position: relative; width: 40px; padding: 0; justify-content: center; flex: 0 0 auto; }
.hub-phone .dz-try-toggle > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.hub-phone .dz-try-sum { order: 2; }
/* landscape phones: one compact row (count, total, chevron | Buy), the wallet line only when coins are short */
.hub-phone.hub-land .dz-try { display: flex; flex-wrap: wrap; align-items: center; column-gap: 10px; row-gap: 4px; padding: 4px 8px; border-radius: 12px; max-height: 60%; }
.hub-phone.hub-land .dz-try-head { flex: 1 1 200px; font-size: .86rem; }
.hub-phone.hub-land .dz-try-head > i { display: none; }
.hub-phone.hub-land .dz-try-toggle, .hub-phone.hub-land .dz-try-row .dz-x { min-height: 34px; height: 34px; }
.hub-phone.hub-land .dz-try-toggle { width: 34px; }
.hub-phone.hub-land .dz-try-list { order: 3; flex: 1 0 100%; }
.hub-phone.hub-land .dz-try-row { min-height: 28px; }
.hub-phone.hub-land .dz-try-buy { flex: 0 1 auto; gap: 8px; }
.hub-phone.hub-land .dz-try-wallet:not(.is-short) { display: none; }
.hub-phone.hub-land .dz-try-buy .retro-button { min-height: 36px; padding: 4px 14px; font-size: .86rem; }

/* saved looks: cached image thumbnails */
.dz-thumbimg { width: 100%; height: 100%; display: block; object-fit: cover; }
.dz-look-meta { color: var(--dim); font-weight: 800; font-size: .68rem; }
