@property --lb-a {
    syntax: "<angle>";
    inherits: false;
    initial-value: 0deg;
}

@keyframes lbRing {
    to {
        --lb-a: 360deg;
    }
}

@keyframes lbFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

@keyframes lbGrow {
    from {
        transform: scaleY(0);
        opacity: 0;
    }
}

@keyframes lbBar {
    from {
        transform: scaleX(0);
    }
}

@keyframes lbSweep {
    0%, 55% {
        transform: translateX(0) skewX(-18deg);
    }
    100% {
        transform: translateX(520%) skewX(-18deg);
    }
}

@keyframes lbGlow {
    0%, 100% {
        box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--lb-tone) 32%, transparent), 0 0 0 0 color-mix(in srgb, var(--lb-tone) 0%, transparent);
    }
    50% {
        box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--lb-tone) 78%, transparent), 0 0 20px 0 color-mix(in srgb, var(--lb-tone) 28%, transparent);
    }
}

.pf-lb {
    --lb-gold: var(--pf-gold);
    --lb-silver: #94a3b8;
    --lb-bronze: #d97706;
    --lb-tone: var(--pf-accent);
    display: grid;
    gap: 16px;
    min-width: 0;
}

.pf-lb[data-board="exp"],
.pf-lbcard--exp,
.pf-lbtab--exp {
    --lb-tone: var(--pf-accent);
}

.pf-lb[data-board="sp"],
.pf-lbcard--sp,
.pf-lbtab--sp {
    --lb-tone: var(--pf-pink);
}

.pf-lb[data-board="time"],
.pf-lbcard--time,
.pf-lbtab--time {
    --lb-tone: #14b8a6;
}

.pf-lb[data-board="days"],
.pf-lbcard--days,
.pf-lbtab--days {
    --lb-tone: #f97316;
}

.pf-lbtab--all {
    --lb-tone: var(--pf-gold);
}

.pf-lb[data-still="1"] :is(.pf-lbinfo, .pf-lbhero, .pf-lbstat, .pf-lbcard, .pf-lbstage, .pf-lbme, .pf-lbnote, .pf-lbp__stage, .pf-lbp__n, .pf-lbp__lv, .pf-lbp__val, .pf-lbp__step, .pf-lbp__rk, .pf-lbr, .pf-lbr__you, .pf-lbr__bar i, .pf-lbme__bar i) {
    animation: none;
}

.pf-lbstamp {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 34px;
    padding: 0 12px;
    border: 1px solid var(--pf-line);
    border-radius: 99px;
    color: var(--pf-mute);
    font-size: 12px;
    white-space: nowrap;
}

.pf-lbstamp .pf-pulse {
    background: var(--pf-ok);
}

.pf-lbrefresh {
    flex: none;
    white-space: nowrap;
}

.pf-lbrefresh.is-spin svg {
    animation: pfSpin .8s linear infinite;
}

.pf-lbrefresh:disabled {
    cursor: default;
    opacity: .72;
}

.pf-lbtabs {
    display: flex;
    gap: 8px;
    min-width: 0;
    padding: 2px 2px 6px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
}

.pf-lbtabs::-webkit-scrollbar {
    display: none;
}

.pf-lbtab {
    position: relative;
    display: inline-flex;
    flex: none;
    align-items: center;
    gap: 8px;
    height: 38px;
    padding: 0 14px;
    border: 1px solid var(--pf-line);
    border-radius: 99px;
    background: var(--pf-panel);
    color: var(--pf-mute);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: transform .25s var(--pf-ease), color .25s, border-color .25s, background-color .25s;
}

.pf-lbtab svg {
    color: var(--lb-tone);
    transition: transform .3s var(--pf-ease);
}

.pf-lbtab:hover {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--lb-tone) 55%, transparent);
    color: var(--pf-ink);
}

.pf-lbtab:hover svg {
    transform: scale(1.15) rotate(-6deg);
}

.pf-lbtab:focus-visible {
    background: color-mix(in srgb, var(--lb-tone) 14%, var(--pf-panel));
}

.pf-lbtab.is-active {
    border-color: var(--lb-tone);
    background: color-mix(in srgb, var(--lb-tone) 14%, var(--pf-panel));
    color: var(--pf-ink);
    box-shadow: 0 6px 18px color-mix(in srgb, var(--lb-tone) 22%, transparent);
}

.pf-lbchip {
    display: inline-flex;
    align-items: center;
    height: 22px;
    padding: 0 9px;
    border-radius: 99px;
    background: color-mix(in srgb, var(--lb-tone, var(--pf-accent)) 16%, transparent);
    color: var(--lb-tone, var(--pf-accent));
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.pf-lbchip--head {
    margin-left: 10px;
    vertical-align: middle;
}

.pf-lbinfo,
.pf-lbcard__p {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--pf-mute);
    font-size: 12.5px;
}

.pf-lbinfo {
    animation: pfFade .5s var(--pf-ease) backwards;
}

.pf-lbcard__c {
    display: grid;
    gap: 14px;
}

.pf-lbhero {
    position: relative;
    display: grid;
    gap: 18px;
    padding: 22px;
    overflow: hidden;
    border: 1px solid var(--pf-line);
    border-radius: 22px;
    background:
        radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--pf-accent) 24%, transparent), transparent 58%),
        radial-gradient(120% 140% at 100% 100%, color-mix(in srgb, var(--pf-pink) 20%, transparent), transparent 58%),
        var(--pf-panel);
    animation: pfRise .55s var(--pf-ease) backwards;
}

.pf-lbhero::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: -40%;
    width: 35%;
    background: linear-gradient(100deg, transparent, color-mix(in srgb, #fff 20%, transparent), transparent);
    transform: skewX(-18deg);
    pointer-events: none;
    animation: lbSweep 7s ease-in-out infinite;
}

.pf-lbhero > * {
    position: relative;
    z-index: 1;
}

.pf-lbhero__txt {
    display: flex;
    align-items: center;
    gap: 14px;
}

.pf-lbhero__ico {
    display: grid;
    place-items: center;
    flex: none;
    width: 58px;
    height: 58px;
    border-radius: 20px;
    background: linear-gradient(145deg, #facc15, #f59e0b);
    color: #3b2a00;
    box-shadow: 0 10px 24px color-mix(in srgb, #f59e0b 36%, transparent);
    animation: lbFloat 4s ease-in-out infinite;
}

.pf-lbhero__c {
    min-width: 0;
}

.pf-lbhero__t {
    font-family: var(--pf-display);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -.02em;
}

.pf-lbhero__p {
    margin-top: 2px;
    color: var(--pf-mute);
    font-size: 13px;
}

.pf-lbhero__stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.pf-lbstat {
    --t: var(--pf-accent);
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 2px 10px;
    min-width: 0;
    padding: 14px;
    border: 1px solid color-mix(in srgb, var(--t) 28%, var(--pf-line));
    border-radius: 18px;
    background: color-mix(in srgb, var(--t) 8%, var(--pf-panel));
    transition: transform .25s var(--pf-ease), border-color .25s, background-color .25s;
    animation: pfRise .55s var(--pf-ease) backwards;
    animation-delay: calc(var(--i, 0) * 70ms + 140ms);
}

.pf-lbstat--sp {
    --t: var(--pf-pink);
}

.pf-lbstat:hover {
    transform: translateY(-3px);
    border-color: var(--t);
}

.pf-lbstat:focus-visible {
    background: color-mix(in srgb, var(--t) 18%, var(--pf-panel));
}

.pf-lbstat__ico {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: color-mix(in srgb, var(--t) 18%, transparent);
    color: var(--t);
}

.pf-lbstat__k {
    color: var(--pf-mute);
    font-size: 12px;
    font-weight: 600;
}

.pf-lbstat__r {
    grid-column: 1 / -1;
    margin-top: 8px;
    font-family: var(--pf-display);
    font-size: 30px;
    line-height: 1.1;
    letter-spacing: -.02em;
}

.pf-lbstat__v {
    grid-column: 1 / -1;
    overflow: hidden;
    color: var(--pf-mute);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pf-lbgrid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.pf-lbcard {
    overflow: hidden;
    background: linear-gradient(180deg, color-mix(in srgb, var(--lb-tone) 9%, var(--pf-panel)), var(--pf-panel) 160px);
    animation: pfRise .55s var(--pf-ease) backwards;
    animation-delay: calc(var(--i, 0) * 90ms + 220ms);
}

.pf-lbbody {
    display: grid;
    gap: 14px;
}

.pf-lbstage {
    padding-top: 30px;
    padding-bottom: 0;
    overflow: hidden;
    background: linear-gradient(180deg, color-mix(in srgb, var(--lb-tone) 9%, var(--pf-panel)), var(--pf-panel) 200px);
    animation: pfRise .55s var(--pf-ease) backwards;
    animation-delay: .1s;
}

.pf-lbpod {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: end;
    gap: 10px;
    padding-top: 30px;
}

.pf-lbstage .pf-lbpod {
    padding-top: 0;
}

.pf-lbp {
    --c: var(--lb-silver);
    --h: 62px;
    min-width: 0;
}

.pf-lbp--r1 {
    --c: var(--lb-gold);
    --h: 86px;
}

.pf-lbp--r2 {
    --c: var(--lb-silver);
    --h: 62px;
}

.pf-lbp--r3 {
    --c: var(--lb-bronze);
    --h: 46px;
}

.pf-lbp__a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    min-width: 0;
    border-radius: 18px 18px 0 0;
    text-align: center;
}

.pf-lbp__stage {
    position: relative;
    display: grid;
    place-items: center;
    animation: pfRise .6s var(--pf-ease) backwards;
    animation-delay: calc(var(--i, 0) * 120ms + 260ms);
}

.pf-lbp__crown {
    position: absolute;
    top: -28px;
    left: 0;
    right: 0;
    display: grid;
    place-items: center;
    color: var(--lb-gold);
    filter: drop-shadow(0 3px 6px color-mix(in srgb, var(--lb-gold) 55%, transparent));
    pointer-events: none;
    animation: lbFloat 3s ease-in-out infinite;
}

.pf-lbp__ring {
    position: relative;
    display: grid;
    place-items: center;
    padding: 3px;
    border-radius: 34%;
    background: conic-gradient(from var(--lb-a), var(--c), color-mix(in srgb, var(--c) 22%, transparent), var(--c));
    transition: transform .35s var(--pf-ease);
}

.pf-lbp--r1 .pf-lbp__ring {
    animation: lbRing 4.5s linear infinite;
}

.pf-lbp--r1 .pf-av {
    width: 72px;
    height: 72px;
}

.pf-lbp--r2 .pf-av,
.pf-lbp--r3 .pf-av {
    width: 54px;
    height: 54px;
}

.pf-lbp__a:hover .pf-lbp__ring {
    transform: translateY(-4px) scale(1.03);
}

.pf-lbp__a:focus-visible .pf-lbp__ring {
    transform: translateY(-4px) scale(1.06);
}

.pf-lbp__rk {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -10px;
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    margin: 0 auto;
    border-radius: 50%;
    background: var(--c);
    color: #1a1200;
    font-family: var(--pf-display);
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 2px 8px color-mix(in srgb, var(--c) 50%, transparent);
    animation: pfPop .5s var(--pf-ease) backwards;
    animation-delay: calc(var(--i, 0) * 120ms + 520ms);
}

.pf-lbp__n {
    display: block;
    max-width: 100%;
    margin-top: 14px;
    overflow: hidden;
    font-size: 13px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
    animation: pfRise .6s var(--pf-ease) backwards;
    animation-delay: calc(var(--i, 0) * 120ms + 320ms);
}

.pf-lbp--r1 .pf-lbp__n {
    font-size: 14px;
}

.pf-lbp__lv {
    color: var(--pf-mute);
    font-size: 11px;
    animation: pfRise .6s var(--pf-ease) backwards;
    animation-delay: calc(var(--i, 0) * 120ms + 360ms);
}

.pf-lbp__val {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
    max-width: 100%;
    margin-top: 2px;
    font-family: var(--pf-display);
    animation: pfRise .6s var(--pf-ease) backwards;
    animation-delay: calc(var(--i, 0) * 120ms + 400ms);
}

.pf-lbp__v {
    color: var(--lb-tone);
    font-size: 15px;
    font-variant-numeric: tabular-nums;
}

.pf-lbp--r1 .pf-lbp__v {
    font-size: 18px;
}

.pf-lbp__u {
    color: var(--pf-mute);
    font-size: 10px;
    font-weight: 600;
}

.pf-lbp__step {
    display: grid;
    place-items: center;
    width: 100%;
    height: var(--h);
    margin-top: 10px;
    border: 1px solid color-mix(in srgb, var(--c) 46%, transparent);
    border-bottom: 0;
    border-radius: 14px 14px 0 0;
    background: linear-gradient(180deg, color-mix(in srgb, var(--c) 34%, transparent), color-mix(in srgb, var(--c) 5%, transparent));
    color: color-mix(in srgb, var(--c) 82%, var(--pf-ink));
    font-family: var(--pf-display);
    font-size: 28px;
    font-weight: 700;
    transform-origin: bottom;
    animation: lbGrow .8s var(--pf-ease) backwards;
    animation-delay: calc(var(--i, 0) * 120ms);
}

.pf-lbp.is-empty {
    opacity: .55;
}

.pf-lbp__ghost {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border: 1px dashed var(--pf-line);
    border-radius: 30%;
    color: var(--pf-faint);
}

.pf-lbp.is-me .pf-lbp__ring {
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--lb-tone) 28%, transparent);
}

.pf-lbl {
    display: grid;
    gap: 8px;
}

.pf-lbr {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--pf-line);
    border-radius: 16px;
    background: var(--pf-panel);
    transition: transform .25s var(--pf-ease), border-color .25s, background-color .25s;
    animation: pfRise .5s var(--pf-ease) backwards;
    animation-delay: calc(var(--i, 0) * 45ms + 160ms);
}

.pf-lbr:hover {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--lb-tone) 50%, transparent);
}

.pf-lbr.is-me {
    border-color: var(--lb-tone);
    background: color-mix(in srgb, var(--lb-tone) 8%, var(--pf-panel));
}

.pf-lbr.is-me::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    animation: lbGlow 2.6s ease-in-out infinite;
}

.pf-lbr__a {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 30px auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    transition: background-color .2s;
}

.pf-lbr__a:focus-visible {
    background: color-mix(in srgb, var(--lb-tone) 12%, transparent);
}

.pf-lbr__rk {
    color: var(--pf-mute);
    font-family: var(--pf-display);
    font-size: 15px;
    font-weight: 700;
    text-align: center;
}

.pf-lbr__b {
    min-width: 0;
}

.pf-lbr__n {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    font-size: 14px;
    font-weight: 600;
}

.pf-lbr__n .pf-nm {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pf-lbr__you {
    flex: none;
    padding: 1px 8px;
    border-radius: 99px;
    background: var(--lb-tone);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    animation: pfPop .5s var(--pf-ease) backwards;
    animation-delay: .5s;
}

.pf-lbr__m {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    margin-top: 2px;
    color: var(--pf-mute);
    font-size: 11.5px;
}

.pf-lbr__t {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pf-lbr__bar,
.pf-lbme__bar {
    display: block;
    height: 4px;
    margin-top: 7px;
    overflow: hidden;
    border-radius: 99px;
    background: color-mix(in srgb, var(--pf-ink) 8%, transparent);
}

.pf-lbr__bar i,
.pf-lbme__bar i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--lb-tone), color-mix(in srgb, var(--lb-tone) 55%, #fff));
    transform: scaleX(var(--w, 0));
    transform-origin: left;
    animation: lbBar .9s var(--pf-ease) backwards;
    animation-delay: calc(var(--i, 0) * 45ms + 300ms);
}

.pf-lbr__val {
    display: grid;
    justify-items: end;
    line-height: 1.15;
    text-align: right;
}

.pf-lbr__v {
    font-family: var(--pf-display);
    font-size: 15px;
    font-variant-numeric: tabular-nums;
}

.pf-lbr__u {
    color: var(--pf-mute);
    font-size: 10px;
    font-weight: 600;
}

.pf-lbme {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    overflow: hidden;
    animation: pfRise .5s var(--pf-ease) backwards;
}

.pf-lbme::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, color-mix(in srgb, var(--lb-tone) 15%, transparent), transparent 62%);
    pointer-events: none;
}

.pf-lbme > * {
    position: relative;
}

.pf-lbme__k {
    color: var(--pf-mute);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.pf-lbme__t {
    margin-top: 2px;
    color: var(--pf-mute);
    font-size: 13px;
}

.pf-lbme__rank {
    margin-right: 2px;
    background: linear-gradient(90deg, var(--lb-tone), color-mix(in srgb, var(--lb-tone) 55%, var(--pf-gold)));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-family: var(--pf-display);
    font-size: 28px;
    letter-spacing: -.02em;
}

.pf-lbme__s {
    margin-top: 2px;
    font-size: 12.5px;
}

.pf-lbme__bar {
    height: 6px;
    margin-top: 10px;
}

.pf-lbme__v {
    display: grid;
    justify-items: end;
    text-align: right;
}

.pf-lbme__n {
    color: var(--lb-tone);
    font-family: var(--pf-display);
    font-size: 22px;
    font-variant-numeric: tabular-nums;
}

.pf-lbme__u {
    color: var(--pf-mute);
    font-size: 11px;
    font-weight: 600;
}

.pf-lbnote {
    color: var(--pf-mute);
    font-size: 12px;
    text-align: center;
    animation: pfFade .6s var(--pf-ease) backwards;
    animation-delay: .6s;
}

.pf-medal--sm {
    width: 22px;
    height: 22px;
}

.pf-medal--sm .pf-medal__t {
    font-size: 10px;
}

@media (max-width: 820px) {
    .pf-lbgrid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 560px) {
    .pf-lbhero {
        padding: 16px;
    }

    .pf-lbhero__ico {
        width: 48px;
        height: 48px;
        border-radius: 16px;
    }

    .pf-lbhero__t {
        font-size: 17px;
    }

    .pf-lbstat {
        padding: 12px;
    }

    .pf-lbstat__r {
        font-size: 26px;
    }

    .pf-lbpod {
        gap: 6px;
    }

    .pf-lbp--r1 {
        --h: 70px;
    }

    .pf-lbp--r2 {
        --h: 52px;
    }

    .pf-lbp--r3 {
        --h: 38px;
    }

    .pf-lbp--r1 .pf-av {
        width: 62px;
        height: 62px;
    }

    .pf-lbp--r2 .pf-av,
    .pf-lbp--r3 .pf-av {
        width: 46px;
        height: 46px;
    }

    .pf-lbp__step {
        font-size: 22px;
    }

    .pf-lbr__a {
        grid-template-columns: 24px auto minmax(0, 1fr) auto;
        gap: 10px;
        padding: 9px 11px;
    }

    .pf-lbme {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .pf-lbme__v {
        grid-column: 1 / -1;
        justify-items: start;
        text-align: left;
    }

    .pf-lbstamp {
        display: none;
    }
}

.pf-lbme__ico {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 16px;
    background: color-mix(in srgb, var(--lb-tone) 18%, transparent);
    color: var(--lb-tone);
}

.pf-lbp__a > .pf-ti {
    height: 20px;
    padding: 0 7px;
    font-size: 10px;
}
