/* ============================================================
   Design preview - 装扮 / 称号 / 活动 board
   Scoped to body.design-v2 so the homepage batch is untouched.
   ============================================================ */

body.design-v2 {
    background: var(--bg-primary);
    --locker-card: rgba(255, 255, 255, .66);
    --locker-scroll: rgba(112, 118, 132, .42);
    --locker-scroll-strong: rgba(112, 118, 132, .6);
    --locker-panel: #f7f7f9;
    --locker-chip: rgba(0, 0, 0, .06);
}

[data-theme="dark"] body.design-v2 {
    --locker-card: rgba(255, 255, 255, .05);
    --locker-scroll: rgba(226, 228, 236, .26);
    --locker-scroll-strong: rgba(226, 228, 236, .4);
    --locker-panel: #1b1b1d;
    --locker-chip: rgba(255, 255, 255, .1);
}

/* the autumn scene behind the whole board, held still while the page scrolls.
   it is blurred a little, so the layer reaches past the viewport on every
   side: the blur pulls the edges inward, and without the extra room the
   corners of the picture fade out */
body.design-v2::before {
    content: '';
    position: fixed;
    inset: -32px;
    background: url('../img/design-bg.jpg') center / cover no-repeat;
    filter: blur(7px) saturate(1.1);
    z-index: -2;
}

body.design-v2::after {
    content: '';
    position: fixed;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, .30), rgba(255, 255, 255, .48));
    z-index: -1;
}

[data-theme="dark"] body.design-v2::after {
    background: linear-gradient(180deg, rgba(12, 14, 18, .52), rgba(12, 14, 18, .68));
}

.locker-wrap {
    max-width: 1280px;
    margin: 0 auto;
    padding: 96px 20px 40px;
}

/* ---------- the two panes ---------- */
body.design-v2 .locker-board {
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    gap: 20px;
    align-items: stretch;
    /* a fixed height, not a minimum: the column has to give the list room to
       scroll when the filter panel unfolds instead of stretching the board */
    height: 680px;
}

body.design-v2 .locker-side,
body.design-v2 .locker-stage {
    background: var(--bg-navbar);
    border-radius: 10px;
    box-shadow: 0 10px 26px rgba(0, 0, 0, .14);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

body.design-v2 .locker-side {
    display: flex;
    flex-direction: column;
    padding: 16px;
    min-height: 0;
}

body.design-v2 .locker-stage {
    padding: 18px;
    overflow-y: auto;
    overflow-x: hidden;
}

/* ---------- search and filters ---------- */
body.design-v2 .locker-search {
    display: flex;
    align-items: center;
    gap: 9px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0 14px;
    height: 46px;
    color: var(--text-secondary);
}

body.design-v2 .locker-search:focus-within {
    border-color: var(--accent);
    color: var(--accent);
}

body.design-v2 .locker-search svg {
    width: 19px;
    height: 19px;
    flex: 0 0 auto;
}

body.design-v2 .locker-search input {
    flex: 1 1 auto;
    min-width: 0;
    border: 0;
    background: none;
    outline: none;
    color: var(--text-primary);
    font-size: 1.4rem;
}

body.design-v2 .locker-search input::placeholder {
    color: var(--text-secondary);
}

/* the filter panel is folded away until the box is opened, because both lists
   keep growing with every round of the clothes system. it unfolds inside the
   column rather than floating over it: a panel that covered the rows would hide
   exactly the ones the filters are meant to narrow down */
body.design-v2 .locker-filter {
    overflow: hidden;
    /* never shrinks: the list gives up its room instead, otherwise the panel
       got squeezed and the second group of chips was cut off */
    flex: 0 0 auto;
    max-height: 0;
    margin: 0;
    padding: 0 12px;
    border-radius: 10px;
    background: var(--locker-panel);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: max-height .3s cubic-bezier(.4, 0, .2, 1), opacity .2s ease,
        transform .26s cubic-bezier(.4, 0, .2, 1), margin .3s cubic-bezier(.4, 0, .2, 1),
        padding .3s cubic-bezier(.4, 0, .2, 1), visibility .3s;
}

body.design-v2 .locker-filter.is-open {
    max-height: 500px;
    overflow: hidden auto;
    opacity: 1;
    visibility: visible;
    transform: none;
    margin: 0 0 12px;
    padding: 12px;
}

body.design-v2 .locker-group {
    margin: 14px 0 9px;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: .5px;
    color: var(--text-secondary);
}

body.design-v2 .locker-group:first-child {
    margin-top: 0;
}

body.design-v2 .locker-chips {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

body.design-v2 .rar-chip,
body.design-v2 .cat-chip {
    border: 1px solid transparent;
    border-radius: 6px;
    padding: 7px 6px;
    font-size: 1.2rem;
    line-height: 1.5;
    font-weight: 600;
    text-align: center;
    color: var(--text-primary);
    background: var(--locker-chip);
    cursor: pointer;
    transition: background .2s ease, color .2s ease, box-shadow .2s ease,
        transform .2s ease, opacity .2s ease;
}

/* a tier chip carries its own colour, spread over the whole button instead of
   a small square in front of the label: the plate in the catalogue and the
   chip in the filter then read as the same thing */
body.design-v2 .rar-chip[aria-pressed="false"] {
    background: var(--rar-flat, #8b8f98);
    color: var(--rar-ink, #fff);
}

/* both groups answer the same way: a picked chip turns blue, whichever list it
   came from */
body.design-v2 .rar-chip[aria-pressed="true"],
body.design-v2 .cat-chip[aria-pressed="true"] {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, .18);
    background: var(--accent);
    color: #fff;
}

/* ---------- the catalogue list ---------- */
/* one card per cosmetic: the preview plate on the left, quality and name to
   its right, and enough air between them that a long list still reads as
   separate entries instead of one dense column */
body.design-v2 .locker-list {
    list-style: none;
    margin: 0;
    padding: 0 2px 0 0;
    overflow-y: auto;
    /* a card that slides right must not open a sideways scrollbar */
    overflow-x: hidden;
    flex: 1 1 auto;
    min-height: 0;
}

body.design-v2 .locker-item {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 0 10px;
    padding: 12px 14px;
    border-radius: 8px;
    background: var(--locker-card);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .07);
    cursor: pointer;
    position: relative;
    transition: box-shadow .2s ease, transform .2s ease;
}

body.design-v2 .locker-item:last-child {
    margin-bottom: 2px;
}

body.design-v2 .locker-item:hover {
    transform: translateY(-1px);
}

/* a picked cosmetic slides to the right, the way a card is pushed in when you
   take it. the ring around it is gone: the move says it already.
   the card gives back the same room on its right, so nothing pokes out of the
   column and the list never grows a sideways scrollbar */
body.design-v2 .locker-item.is-on {
    box-shadow: 0 4px 12px rgba(0, 0, 0, .12);
    transform: translateX(12px);
    width: calc(100% - 12px);
}

body.design-v2 .locker-item.is-on:hover {
    transform: translate(12px, -1px);
}

/* a hidden cosmetic stands under the same night sky as its badge, but the sky
   is on the row itself and moves: the far field drifts, the small stars
   breathe and the big ones fall across it. it is faded back, so the row still
   reads as a row and the sky is only a hint of what that tier is */
body.design-v2 .locker-item[data-rar="hidden"] {
    overflow: hidden;
}

body.design-v2 .locker-item[data-rar="hidden"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: calc(var(--sky-tile) * -1);
    bottom: calc(var(--sky-tile) * -1);
    z-index: 0;
    background-color: #05061a;
    background-image: var(--sky-far), var(--sky-s1), var(--sky-night);
    background-size: var(--sky-tile) var(--sky-tile), var(--sky-tile) var(--sky-tile), cover;
    animation: skyDrift 110s linear infinite, skyBreath 13s ease-in-out infinite;
    opacity: .3;
    pointer-events: none;
}

/* the big stars fall across the row */
body.design-v2 .locker-item[data-rar="hidden"]::after {
    content: '';
    position: absolute;
    top: calc(var(--streak-tile) * -1);
    right: calc(var(--streak-tile) * -1);
    bottom: 0;
    left: 0;
    z-index: 0;
    background-image: var(--sky-streak);
    background-size: var(--streak-tile) var(--streak-tile);
    background-repeat: repeat;
    animation: skyFall 1.8s linear infinite;
    opacity: .45;
    pointer-events: none;
}

body.design-v2 .locker-item[data-rar="hidden"] .locker-slot,
body.design-v2 .locker-item[data-rar="hidden"] .locker-meta {
    position: relative;
    z-index: 1;
}

/* the name sits on the night sky now, so it has to be a light one */
body.design-v2 .locker-item[data-rar="hidden"] .locker-name {
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .55);
}

body.design-v2 .locker-item:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}

/* the icon sits straight on the row. the tier used to be painted on a small
   square behind it, but that square only stood in for an icon; now the badge
   next to it carries the colour, so the square is gone */
body.design-v2 .locker-slot {
    flex: 0 0 auto;
    width: 56px;
    height: 56px;
    border-radius: 8px;
    display: grid;
    place-items: center;
}

/* the plate carries the tier colour and the icon sits on top of it. a cosmetic
   the game has no picture for falls back to the not-found picture, and that
   one stays a size smaller, so the colour around it still reads */
body.design-v2 .locker-icon {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

body.design-v2 .locker-icon.is-missing {
    width: 86%;
    height: 86%;
}

body.design-v2 .locker-meta {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    align-items: flex-start;
    gap: 7px;
    min-width: 0;
}

body.design-v2 .locker-name {
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.design-v2 .locker-empty {
    margin: 18px 4px;
    font-size: 1.35rem;
    color: var(--text-secondary);
    text-align: center;
}

/* ---------- scrollbars ---------- */
/* the native bar is a wide grey gutter with an arrow button at each end; the
   board only wants a soft sliver that sits on the glass, so the thumb keeps a
   transparent border and only its middle paints. scrollbar-width is left alone
   on purpose: as soon as it is set, Chromium ignores these pseudo-elements. */
body.design-v2 .locker-list::-webkit-scrollbar,
body.design-v2 .locker-stage::-webkit-scrollbar,
body.design-v2 .locker-filter::-webkit-scrollbar {
    width: 8px;
}

body.design-v2 .locker-list::-webkit-scrollbar-button,
body.design-v2 .locker-stage::-webkit-scrollbar-button,
body.design-v2 .locker-filter::-webkit-scrollbar-button {
    display: none;
    width: 0;
    height: 0;
}

body.design-v2 .locker-list::-webkit-scrollbar-track,
body.design-v2 .locker-stage::-webkit-scrollbar-track,
body.design-v2 .locker-filter::-webkit-scrollbar-track {
    background: transparent;
}

body.design-v2 .locker-list::-webkit-scrollbar-thumb,
body.design-v2 .locker-stage::-webkit-scrollbar-thumb,
body.design-v2 .locker-filter::-webkit-scrollbar-thumb {
    border: 2px solid transparent;
    border-radius: 8px;
    background-clip: padding-box;
    background-color: var(--locker-scroll);
}

body.design-v2 .locker-list:hover::-webkit-scrollbar-thumb,
body.design-v2 .locker-stage:hover::-webkit-scrollbar-thumb,
body.design-v2 .locker-filter:hover::-webkit-scrollbar-thumb {
    background-color: var(--locker-scroll-strong);
}

/* ---------- quality badges ---------- */
/* the six tiers of the game, in its own order. 传奇 stays a flat yellow so it
   never reads as 限定, and only 限定 gets the gold. */
body.design-v2 .rar-badge {
    align-self: flex-start;
    border-radius: 4px;
    padding: 3px 10px;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: .5px;
    line-height: 1.5;
    color: var(--rar-ink, #fff);
    background: var(--rar-flat, #8b8f98);
}

body.design-v2 [data-rar="common"] {
    --rar-flat: #8b8f98;
    --rar-ring: rgba(139, 143, 152, .5);
    --rar-ink: #fff;
}

body.design-v2 [data-rar="rare"] {
    --rar-flat: #22c55e;
    --rar-ring: rgba(34, 197, 94, .55);
    --rar-ink: #fff;
}

body.design-v2 [data-rar="epic"] {
    --rar-flat: #8b5cf6;
    --rar-ring: rgba(139, 92, 246, .55);
    --rar-ink: #fff;
}

body.design-v2 [data-rar="legend"] {
    --rar-flat: #facc15;
    --rar-ring: rgba(250, 204, 21, .6);
    --rar-ink: #4a3800;
}

body.design-v2 [data-rar="limited"] {
    --rar-flat: linear-gradient(150deg, #ffe9a3 0%, #e6b422 46%, #a9760b 100%);
    --rar-ring: rgba(230, 180, 34, .7);
    --rar-ink: #4a3200;
}

body.design-v2 [data-rar="limited"] .rar-badge,
body.design-v2 [data-rar="limited"] .locker-slot,
body.design-v2 .rar-chip[data-rar="limited"][aria-pressed="false"] {
    text-shadow: 0 1px 0 rgba(255, 255, 255, .35);
}

/* the gold gradient starts almost white, and on a button that wide the light
   stop hugs the top edge as a bright rim, which reads as an outline rather
   than as the colour. the chip takes the same gold flat, the way the other
   tiers do; the small badge and the plate keep the gradient, where it has
   room to look like metal */
body.design-v2 .rar-chip[data-rar="limited"][aria-pressed="false"] {
    background-image: none;
    background-color: #dcae1d;
}

/* 隐藏 is not a colour either: it is the night, and the stars come later */
body.design-v2 [data-rar="hidden"] {
    --rar-flat: #14173c;
    --rar-ring: rgba(150, 164, 226, .5);
    --rar-ink: #fff;
}

/* 隐藏 is a night sky, drawn the way the reference is: flat white dots,
   four-point stars with pinched sides, long thin tails. Seven small pngs,
   9 KB together, decoded once by localdev/make_stars.js.

   One tile per behaviour, and one layer per tile, because that is the only
   way each star can move on its own without a repaint. The earlier version
   stepped through a four-phase sheet, and although it was cheap, every star
   changed on the same tick and it read like a slide projector. Now nothing
   but transform and opacity is animated, which the compositor moves and fades
   without touching pixels: the far field never moves at all, the small stars
   drift slowly and breathe on two different clocks, the medium stars pulse on
   three, and the big ones fall. */
body.design-v2 {
    --sky-far: url('../img/stars.png?v=27');
    --sky-s1: url('../img/stars-a.png?v=27');
    --sky-s2: url('../img/stars-b.png?v=27');
    --sky-m1: url('../img/stars-c1.png?v=27');
    --sky-m2: url('../img/stars-c2.png?v=27');
    --sky-m3: url('../img/stars-c3.png?v=27');
    --sky-streak: url('../img/streaks.png?v=27');
    --sky-tile: 128px;
    --streak-tile: 256px;
    --sky-night: linear-gradient(155deg, #1b1f42 0%, #0b0d24 55%, #05061a 100%);
}

body.design-v2 [data-rar="hidden"] .rar-badge,
body.design-v2 .rar-chip[data-rar="hidden"] {
    background-color: #05061a;
    background-image: var(--sky-far), var(--sky-night);
    background-size: var(--sky-tile) var(--sky-tile), cover;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .55);
    /* the plates clip their own layers and keep their own stacking context,
       otherwise the stars would show through to the page behind */
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

/* 隐藏 keeps its sky whether it is picked or not: the sky is the whole point
   of that tier, and the chip has to look exactly like the badge it stands for.
   the selection shows up as a blue rim instead of a fill, because filling it
   would throw the sky away */
body.design-v2 .rar-chip[data-rar="hidden"][aria-pressed="true"] {
    box-shadow: 0 0 0 2px var(--accent), 0 3px 10px rgba(0, 0, 0, .18);
    transform: translateY(-1px);
}

/* every sky layer is a repeated tile that sits between the plate's own
   background and its letter, and only ever gets moved or faded */
body.design-v2 [data-rar="hidden"] .rar-badge::before,
body.design-v2 [data-rar="hidden"] .rar-badge::after,
body.design-v2 .rar-chip[data-rar="hidden"]::before,
body.design-v2 .rar-chip[data-rar="hidden"]::after,
body.design-v2 [data-rar="hidden"] .sky {
    position: absolute;
    z-index: -1;
    pointer-events: none;
    background-repeat: repeat;
    background-size: var(--sky-tile) var(--sky-tile);
    will-change: transform, opacity;
}

body.design-v2 [data-rar="hidden"] .rar-badge::before,
body.design-v2 [data-rar="hidden"] .rar-badge::after,
body.design-v2 .rar-chip[data-rar="hidden"]::before,
body.design-v2 .rar-chip[data-rar="hidden"]::after {
    content: '';
}

/* the drift layers hang one tile past the plate on the two sides they travel
   away from, and slide by exactly one tile, so the loop can neither show a gap
   nor jump. 128px over 110s is about 1.2px a second, which is how slowly a
   real sky seems to go */
body.design-v2 [data-rar="hidden"] .rar-badge::before,
body.design-v2 .rar-chip[data-rar="hidden"]::before,
body.design-v2 [data-rar="hidden"] .sky {
    top: 0;
    left: 0;
    right: calc(var(--sky-tile) * -1);
    bottom: calc(var(--sky-tile) * -1);
}

@keyframes skyDrift {
    from {
        transform: translate3d(0, 0, 0);
    }

    to {
        transform: translate3d(calc(var(--sky-tile) * -1), calc(var(--sky-tile) * -1), 0);
    }
}

/* the small stars: two halves of one sky, each with its own clock, so the
   field brightens in places rather than all at once */
body.design-v2 [data-rar="hidden"] .rar-badge::before,
body.design-v2 .rar-chip[data-rar="hidden"]::before {
    background-image: var(--sky-s1);
    animation: skyDrift 110s linear infinite, skyBreath 13s ease-in-out infinite;
}

body.design-v2 [data-rar="hidden"] .sky-s2 {
    background-image: var(--sky-s2);
    animation: skyDrift 140s linear infinite, skyBreath 9s ease-in-out infinite;
}

@keyframes skyBreath {
    0%, 100% {
        opacity: .55;
    }

    50% {
        opacity: 1;
    }
}

/* the medium stars: three tiles pulsing on three periods that share no common
   factor, which is what keeps them from blinking together. they fade rather
   than switch, and they never go fully out */
body.design-v2 [data-rar="hidden"] .sky-m1 {
    background-image: var(--sky-m1);
    animation: skyDrift 120s linear infinite, skyPulse 2.4s ease-in-out infinite;
}

body.design-v2 [data-rar="hidden"] .sky-m2 {
    background-image: var(--sky-m2);
    animation: skyDrift 120s linear infinite, skyPulse 3.7s ease-in-out infinite .8s;
}

body.design-v2 [data-rar="hidden"] .sky-m3 {
    background-image: var(--sky-m3);
    animation: skyDrift 120s linear infinite, skyPulse 5.3s ease-in-out infinite 1.6s;
}

@keyframes skyPulse {
    0%, 100% {
        opacity: .12;
    }

    50% {
        opacity: 1;
    }
}

/* the big stars. the tile is drawn so that the head sits at the lower-left end
   of its tail and this layer slides that same diagonal, so nothing has to be
   rotated. one tile in 1.8s is about 140px a second, which across a 56px plate
   is a flash and not a drift. */
body.design-v2 [data-rar="hidden"] .rar-badge::after,
body.design-v2 .rar-chip[data-rar="hidden"]::after {
    top: calc(var(--streak-tile) * -1);
    right: calc(var(--streak-tile) * -1);
    bottom: 0;
    left: 0;
    background-image: var(--sky-streak);
    background-size: var(--streak-tile) var(--streak-tile);
    animation: skyFall 1.8s linear infinite;
}

@keyframes skyFall {
    from {
        transform: translate3d(0, 0, 0);
    }

    to {
        transform: translate3d(calc(var(--streak-tile) * -1), var(--streak-tile), 0);
    }
}

@media (prefers-reduced-motion: reduce) {
    body.design-v2 [data-rar="hidden"] .rar-badge::after,
    body.design-v2 [data-rar="hidden"] .rar-badge::before,
    body.design-v2 .rar-chip[data-rar="hidden"]::before,
    body.design-v2 .rar-chip[data-rar="hidden"]::after,
    body.design-v2 .locker-item[data-rar="hidden"]::before,
    body.design-v2 .locker-item[data-rar="hidden"]::after,
    body.design-v2 [data-rar="hidden"] .sky {
        animation: none;
    }
}

/* ---------- the 3D viewer ---------- */
/* the preview lives inside the site's glass card. the toolbar is a strip of
   its own at the top right of the card, with a gap between it and the canvas;
   only when the whole thing goes fullscreen does the toolbar float over the
   canvas, to give the model the room */
body.design-v2 .locker-stage {
    position: relative;
    padding: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

body.design-v2 .ltpc-frame {
    position: relative;
    inset: auto;
    flex: 1 1 auto;
    width: 100%;
    min-height: 0;
    border: 0;
    border-radius: 10px;
    display: block;
    background: #0b1016;
}

/* the toolbar's colours are the other way round from the page: deep black by
   day, grey white by night. but it still has to be glass - the same
   translucent, blurred, rounded language as the card it sits in, otherwise it
   reads as a foreign object dropped onto the page */
body.design-v2 .locker-bar {
    flex: 0 0 auto;
    align-self: flex-end;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    row-gap: 6px;
    padding: 8px 12px;
    background: rgba(22, 26, 34, .55);
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 12px;
    backdrop-filter: blur(12px) saturate(1.2);
    -webkit-backdrop-filter: blur(12px) saturate(1.2);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
    color: #e6e9ef;
}

/* in fullscreen the strip would only take room away from the model, so the
   toolbar floats on the canvas instead */
body.design-v2 .locker-stage.is-fullscreen .locker-bar {
    position: absolute;
    top: 26px;
    right: 26px;
    z-index: 4;
}

/* the toolbar's colours are the other way round from the page: deep black by
   day, grey white by night. but it still has to be glass - the same
   translucent, blurred, rounded language as the card it sits in, otherwise it
   reads as a foreign object dropped onto the page */
body.design-v2 .locker-bar {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    row-gap: 6px;
    padding: 8px 12px;
    background: rgba(22, 26, 34, .55);
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 12px;
    backdrop-filter: blur(12px) saturate(1.2);
    -webkit-backdrop-filter: blur(12px) saturate(1.2);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
    color: #e6e9ef;
}

[data-theme="dark"] body.design-v2 .locker-bar {
    background: rgba(238, 240, 244, .5);
    border-color: rgba(255, 255, 255, .5);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .28);
    color: #1a2029;
}

body.design-v2 .locker-bar-select {
    height: 28px;
    padding: 0 8px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, .18);
    background: rgba(255, 255, 255, .1);
    color: inherit;
    font-size: 1.2rem;
    font-family: inherit;
    cursor: pointer;
    transition: border-color .2s ease, background .2s ease;
}

[data-theme="dark"] body.design-v2 .locker-bar-select {
    border-color: rgba(0, 0, 0, .12);
    background: rgba(255, 255, 255, .45);
}

body.design-v2 .locker-bar-select:hover { border-color: var(--accent); }
body.design-v2 .locker-bar-select:disabled { opacity: .45; cursor: not-allowed; }

body.design-v2 .locker-bar-btn {
    width: 28px;
    height: 28px;
    flex: 0 0 auto;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: inherit;
    opacity: .78;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    transition: background .2s ease, opacity .2s ease;
}

body.design-v2 .locker-bar-btn:hover { background: rgba(255, 255, 255, .16); opacity: 1; }

[data-theme="dark"] body.design-v2 .locker-bar-btn:hover {
    background: rgba(0, 0, 0, .08);
}

body.design-v2 .locker-bar-btn.is-on {
    background: var(--accent);
    color: #fff;
    opacity: 1;
}

/* 没有动画的装扮，播放键是按不动的 */
body.design-v2 .locker-bar-btn:disabled {
    opacity: .3;
    cursor: not-allowed;
}

body.design-v2 .locker-bar-btn:disabled:hover {
    background: transparent;
    opacity: .3;
}

/* the animation progress: a plain bar. no rounded ends, no glowing knob -
   just the line and how far along it is */
body.design-v2 .locker-bar-progress {
    display: flex;
    align-items: center;
    flex: 0 1 auto;
    min-width: 0;
}

body.design-v2 .locker-bar-progress input[type=range] {
    -webkit-appearance: none;
    appearance: none;
    width: 150px;
    height: 6px;
    margin: 0;
    border: none;
    border-radius: 999px;
    outline: none;
    cursor: pointer;
    background: linear-gradient(90deg, #4ade80 0 var(--fill, 0%), rgba(74, 222, 128, .25) var(--fill, 0%) 100%);
}

/* the bar says how far along it is, that is all - no little white handle
   standing in the middle of it */
body.design-v2 .locker-bar-progress input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: transparent;
    opacity: 0;
}

body.design-v2 .locker-bar-progress input[type=range]::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border: none;
    border-radius: 50%;
    background: transparent;
    opacity: 0;
}

body.design-v2 .locker-bar-progress input[type=range]::-moz-range-track {
    height: 6px;
    border-radius: 999px;
    background: rgba(74, 222, 128, .25);
}

/* the name of the model is already in the list on the left, so it does not
   repeat there. it only comes back when the preview goes fullscreen and the
   list is out of sight */
body.design-v2 .ltpc-overlay {
    display: none;
}

body.design-v2 .locker-stage.is-fullscreen .ltpc-overlay {
    display: flex;
    left: 26px;
    right: auto;
    bottom: 26px;
    gap: 8px;
    padding: 7px 14px;
    border-radius: 10px;
    background: var(--bg-navbar);
    border: 1px solid var(--border-color);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .12);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--text-primary);
    font-size: 1.3rem;
}

/* ---------- the detail pane ---------- */
/* the pane is only a frame for now: what stands in it comes from the real
   cosmetic data later, so the placeholder is a plain note that goes away the
   moment a row is picked. it draws no border of its own - the glass panel
   around it already frames the area, and a dashed line inside it only made
   the placeholder look like a permanent frame */
body.design-v2 .locker-hint {
    flex: 1 1 auto;
    min-height: 0;
    margin: 0;
    padding: 18px;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 10px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.4rem;
}
body.design-v2 .locker-hint[hidden] {
    display: none;
}

body.design-v2 .locker-hint strong {
    font-size: 1.6rem;
    color: var(--text-primary);
}

/* ---------- the tabs under the board ---------- */
/* the tabs answer the same way the menu in the top bar does: the glass strip
   stays empty, the picked tab turns blue and the marker slides underneath it */
body.design-v2 .locker-tabs {
    display: flex;
    justify-content: center;
    margin: 22px 0 0;
}

body.design-v2 .locker-tabs .locker-tabs-inner {
    position: relative;
    display: flex;
    padding: 6px 8px;
    border-radius: 14px;
    background: var(--bg-navbar);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .12);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

body.design-v2 .locker-tab {
    position: relative;
    z-index: 1;
    border: 0;
    background: none;
    padding: 8px 16px;
    margin: 0 2px;
    border-radius: 10px;
    /* the root font is a tenth of the usual size, so 1.6rem is the 16px the
       menu in the top bar uses */
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: color .25s ease;
}

body.design-v2 .locker-tab.is-on {
    color: var(--accent);
}

/* the blue line under the picked tab, the same one the top bar uses */
body.design-v2 .locker-tab-marker {
    position: absolute;
    left: 0;
    top: 0;
    height: 3px;
    width: 0;
    border-radius: 3px;
    background: var(--accent);
    opacity: 0;
    pointer-events: none;
    transition: transform .38s cubic-bezier(.4, 0, .2, 1), width .38s cubic-bezier(.4, 0, .2, 1), opacity .25s ease;
}

/* the light that shines up from the line while the pointer is on the bar */
body.design-v2 .locker-tab-marker::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 100%;
    width: 150%;
    height: 26px;
    transform: translateX(-50%);
    background: radial-gradient(ellipse at 50% 100%, var(--accent-overlay), transparent 70%);
    opacity: 0;
    transition: opacity .35s ease;
}

body.design-v2 .locker-tab-marker.is-hover::after {
    opacity: 1;
}

/* ---------- boards that are not built yet ---------- */
body.design-v2 .locker-soon {
    display: none;
    grid-column: 1 / -1;
    place-items: center;
    align-content: center;
    text-align: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 1.4rem;
}

body.design-v2 .locker-board[data-board="events"] .locker-soon-events {
    display: grid;
}

body.design-v2 .locker-board[data-board="ranks"] .locker-ranks {
    display: flex;
}

body.design-v2 .locker-soon strong {
    font-size: 1.8rem;
    color: var(--text-primary);
}

body.design-v2 .locker-soon span {
    font-size: 1.4rem;
}

body.design-v2 .locker-soon {
    min-height: 300px;
    background: var(--bg-navbar);
    border-radius: 10px;
    box-shadow: 0 10px 26px rgba(0, 0, 0, .14);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

body.design-v2 .locker-board:not([data-board="clothes"]) .locker-side,
body.design-v2 .locker-board:not([data-board="clothes"]) .locker-stage {
    display: none;
}

/* ---------- the 称号 board ---------- */
/* one wide panel instead of the two panes: the kind switch on top and the
   catalogue in the box under it, the way the mockup draws it */
body.design-v2 .locker-ranks {
    display: none;
    grid-column: 1 / -1;
    flex-direction: column;
    gap: 14px;
    padding: 16px;
    min-height: 0;
    background: var(--bg-navbar);
    border-radius: 10px;
    box-shadow: 0 10px 26px rgba(0, 0, 0, .14);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

body.design-v2 .ranks-switch {
    display: flex;
    align-self: flex-start;
    padding: 4px;
    border-radius: 8px;
    background: var(--locker-chip);
}

body.design-v2 .ranks-switch-btn {
    border: 0;
    background: none;
    padding: 8px 18px;
    border-radius: 6px;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: background .2s ease, color .2s ease;
}

body.design-v2 .ranks-switch-btn.is-on {
    background: var(--accent);
    color: #fff;
}

body.design-v2 .ranks-body {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
    padding: 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--locker-card);
    overflow: hidden;
}

body.design-v2 .ranks-grid {
    list-style: none;
    margin: 0;
    padding: 0 2px 0 0;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 12px;
    align-content: start;
}

/* the hidden attribute has to win over the grid display above */
body.design-v2 .ranks-grid[hidden] {
    display: none;
}

body.design-v2 .ranks-grid::-webkit-scrollbar {
    width: 8px;
}

body.design-v2 .ranks-grid::-webkit-scrollbar-button {
    display: none;
}

body.design-v2 .ranks-grid::-webkit-scrollbar-track {
    background: transparent;
}

body.design-v2 .ranks-grid::-webkit-scrollbar-thumb {
    border: 2px solid transparent;
    border-radius: 8px;
    background-clip: padding-box;
    background-color: var(--locker-scroll);
}

body.design-v2 .ranks-grid:hover::-webkit-scrollbar-thumb {
    background-color: var(--locker-scroll-strong);
}

body.design-v2 .rank-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 16px 12px;
    border-radius: 8px;
    background: var(--locker-card);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .07);
}

body.design-v2 .rank-card-img {
    cursor: zoom-in;
}

body.design-v2 .rank-card-img:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* the tag the game draws: square corners on a black plate, and the client's
   own pixel font so the letters keep their stepped edges */
body.design-v2 .rank-plate {
    max-width: 100%;
    padding: 3px 6px;
    border-radius: 0;
    background: rgba(0, 0, 0, .5);
    color: #fff;
    font-family: 'Minecraft AE', 'Roboto', sans-serif;
    font-size: 16px;
    line-height: 20px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, .5);
    -webkit-font-smoothing: none;
}

body.design-v2 .rank-plate-img {
    position: relative;
    display: block;
    width: 100%;
    height: 56px;
    padding: 0;
    overflow: hidden;
    background: none;
}

/* each glyph hides its art in a different bbox (7x7 up to 62x25 inside the
   64px canvas), so the inline script measures every picture and contain-fits
   its own box in here; centred whole-canvas is the pre-measure fallback */
body.design-v2 .rank-plate-img .glyph-img {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    image-rendering: pixelated;
}

/* ---------- picture-title zoom ---------- */
body.design-v2 .rank-zoom {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .45);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

body.design-v2 .rank-zoom[hidden] {
    display: none;
}

body.design-v2 .rank-zoom-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 8px;
    background: rgba(255, 255, 255, .16);
    color: #fff;
    font-size: 2.4rem;
    line-height: 1;
    cursor: pointer;
}

body.design-v2 .rank-zoom-panel {
    position: relative;
    display: flex;
    align-items: stretch;
    gap: 38px;
    padding: 83px 32px 25px 20px;
    border-radius: 10px;
    background: var(--locker-card);
    box-shadow: 0 10px 26px rgba(0, 0, 0, .14);
}

[data-theme="dark"] body.design-v2 .rank-zoom-panel {
    background: rgba(27, 27, 29, .66);
}

body.design-v2 .rank-zoom-hint {
    position: absolute;
    top: 10px;
    left: 20px;
    z-index: 2;
    padding: 8px 14px;
    border-radius: 8px;
    background: var(--locker-panel);
    box-shadow: 0 4px 14px rgba(0, 0, 0, .18);
    color: var(--text-primary);
    font-size: 1.4rem;
    pointer-events: none;
}

body.design-v2 .rank-zoom-plate {
    position: relative;
    width: min(880px, 76vw);
    height: min(480px, 60vh);
    border-radius: 8px;
    background: var(--locker-panel);
    overflow: hidden;
    cursor: grab;
    touch-action: none;
}

body.design-v2 .rank-zoom-plate.is-drag {
    cursor: grabbing;
}

body.design-v2 .rank-zoom-img {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    image-rendering: pixelated;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}

body.design-v2 .rank-zoom-tools {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 30px;
    padding: 7px 0 12px;
}

/* drawn + / - end marks, not buttons: the capsule between them is a
   progress-bar style lever - press or drag anywhere on it, the grey fill
   rises from the bottom, no knob */
body.design-v2 .rank-zoom-mark {
    position: relative;
    width: 24px;
    height: 24px;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .35));
    pointer-events: none;
}

body.design-v2 .rank-zoom-mark::before,
body.design-v2 .rank-zoom-mark::after {
    content: "";
    position: absolute;
    border-radius: 3px;
    background: #fff;
}

body.design-v2 .rank-zoom-mark::before {
    left: 0;
    top: 9px;
    width: 24px;
    height: 6px;
}

body.design-v2 .rank-zoom-mark::after {
    left: 9px;
    top: 0;
    width: 6px;
    height: 24px;
}

body.design-v2 .rank-zoom-mark-plus {
    margin-bottom: 10px;
}

body.design-v2 .rank-zoom-mark-minus {
    height: 6px;
    margin-top: 14px;
}

body.design-v2 .rank-zoom-mark-minus::after {
    display: none;
}

body.design-v2 .rank-zoom-mark-minus::before {
    top: 0;
}

body.design-v2 .rank-zoom-track {
    position: relative;
    flex: 1;
    width: 30px;
    min-height: 140px;
    border-radius: 15px;
    background: #fff;
    overflow: hidden;
    cursor: pointer;
    touch-action: none;
}

body.design-v2 .rank-zoom-track:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

[data-theme="dark"] body.design-v2 .rank-zoom-track {
    background: rgba(255, 255, 255, .12);
}

body.design-v2 .rank-zoom-fill {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 20%;
    background: #8b8f98;
    pointer-events: none;
}

/* ---------- phones ---------- */
@media (max-width: 991.98px) {
    body.design-v2 .locker-wrap {
        padding-top: 84px;
    }

    body.design-v2 .locker-board {
        grid-template-columns: minmax(0, 1fr);
        height: auto;
    }

    body.design-v2 .locker-side {
        max-height: none;
    }

    /* the column grows with the open filter panel, so the cap goes on the list
       instead of the whole card - capping the card used to clip the panel */
    body.design-v2 .locker-list {
        flex: 0 1 auto;
        max-height: 360px;
    }

    body.design-v2 .locker-stage {
        min-height: 420px;
    }

    body.design-v2 .locker-hint {
        min-height: 384px;
    }

    body.design-v2 .locker-tab {
        padding: 8px 14px;
    }

    body.design-v2 .ranks-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        max-height: 420px;
    }

    body.design-v2 .rank-zoom-panel {
        gap: 12px;
        padding: 64px 12px 16px 12px;
    }

    body.design-v2 .rank-zoom-hint {
        top: 8px;
        left: 12px;
    }

    body.design-v2 .rank-zoom-tools {
        width: 24px;
    }

    body.design-v2 .rank-zoom-track {
        width: 24px;
        border-radius: 12px;
    }
}
