.history-list-container [hidden] {
    display: none !important;
}

html.date-archive-page,
body.date-archive-page {
    overflow-x: clip;
}

.history-page,
.history-list-container,
.history-layout,
.history-main {
    width: 100%;
    overflow: visible;
}

.history-title {
    height: 3.4rem;
    margin: 0;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: #222;
    font-size: 1.2rem;
    font-weight: 500;
}

.history-main {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.history-filter {
    flex-direction: column;
    gap: 1.2rem;
}

.history-years {
    display: none;
}

.history-years-scroll {
    display: flex;
    align-items: center;
    gap: 2rem;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.history-years-scroll::-webkit-scrollbar {
    display: none;
}

.archive-year-toggle,
.archive-month,
.archive-mobile-year,
.archive-mobile-month,
.archive-page {
    text-decoration: none;
}

.history-year-tab,
.history-year-tab:link,
.history-year-tab:visited,
.history-year-tab:hover,
.history-year-tab:active {
    height: 3.2rem;
    min-width: 4.2rem;
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
    color: #222;
    font-size: 1.8rem;
    font-weight: 500;
    line-height: 1.2;
    text-decoration: none;
}

.history-year-tab::after {
    content: "";
    width: 2.2rem;
    height: 0.2rem;
    display: block;
    border-radius: 0.1rem;
    background: transparent;
}

.history-year-tab.is-current,
.history-year-tab.is-current:link,
.history-year-tab.is-current:visited,
.history-year-tab.is-current:hover,
.history-year-tab.is-current:active {
    color: #bb8550;
}

.history-year-tab.is-current::after {
    background: #bb8550;
}

.history-months {
    display: none;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.2rem 1.25rem;
}

.history-months.is-active {
    display: grid;
}

.history-month-chip,
.history-month-chip:link,
.history-month-chip:visited,
.history-month-chip:hover,
.history-month-chip:active,
.history-month-chip:focus {
    min-width: 0;
    padding: 0.5rem 0.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid #bb8550;
    border-radius: 0.4rem;
    background: rgba(187, 133, 80, 0.05);
    color: #bb8550;
    font-size: 1.2rem;
    font-weight: 500;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
}

.history-month-chip.is-current,
.history-month-chip.is-current:link,
.history-month-chip.is-current:visited,
.history-month-chip.is-current:hover,
.history-month-chip.is-current:active,
.history-month-chip.is-current:focus {
    border-color: transparent;
    background: rgba(187, 133, 80, 0.5);
    color: #fff;
}

.history-content {
    scroll-margin-top: calc(var(--van-nav-bar-height) + 4.4rem);
}

.archive-list-panel {
    position: relative;
    min-height: 20rem;
}

.archive-loading {
    padding: 2rem;
    color: var(--p-text-color);
    text-align: center;
}

.history-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.history-list li {
    min-width: 0;
}

.history-list li + li {
    margin-top: 1.2rem;
}

.history-item {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}

.history-item-date {
    flex: 0 0 auto;
    color: #070710;
    font-size: 1.6rem;
    font-weight: 400;
    white-space: nowrap;
}

.history-item-dash {
    font-style: normal;
    font-weight: 400;
}

.history-item-card {
    min-width: 0;
    padding: 1.2rem 0.8rem;
    display: flex;
    flex: 1;
    align-items: center;
    border-radius: 0.4rem;
    background: #fff;
}

.history-list .subtitle {
    min-width: 0;
    display: block;
    flex: 1;
}

.history-item-title {
    width: 100%;
    min-width: 0;
    display: block;
    overflow: hidden;
    color: #222;
    font-size: 1.6rem;
    font-weight: 400;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.history-fail {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.2rem;
    padding: 0;
}

.archive-failure:not([hidden]) {
    display: flex;
}

.history-fail-art {
    width: 100%;
    max-width: 29.3rem;
    height: auto;
    aspect-ratio: 586 / 352;
    display: block;
    object-fit: contain;
    background: transparent;
}

.history-fail-text {
    margin: 0;
    color: #222;
    font-size: 1.2rem;
    font-weight: 400;
    text-align: center;
}

.history-retry {
    padding: 0;
    border: 0;
    background: transparent;
    color: #bb8550;
    cursor: pointer;
    font: inherit;
    text-decoration: underline;
}

.history-page #van-pagination {
    margin-top: 0;
}

.archive-pagination .archive-page-jump-label {
    padding: 0;
    color: var(--nav-title-color);
    font-size: 1rem;
}

.archive-pagination .archive-page-jump-button {
    width: 100%;
    height: 100%;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    border: 0;
    font-weight: 500;
    cursor: pointer;
}

.archive-toast {
    position: fixed;
    left: 50%;
    bottom: 12%;
    z-index: 10000;
    padding: 0.75rem 1.1rem;
    transform: translateX(-50%);
    border-radius: 0.35rem;
    background: rgba(0, 0, 0, 0.78);
    color: #fff;
    font-size: 0.95rem;
}

#xqbj-contact-container .ad-wrap {
    display: none !important;
}

@media (max-width: 960px) {
    html.date-archive-page,
    body.date-archive-page {
        overflow: visible;
        overflow-x: clip;
    }

    #xqbj-container,
    #xqbj-container.full-container,
    #xqbj-container .xqbj-main,
    #xqbj-container > .xqbj-main > .xqbj-main-container {
        height: auto;
        overflow: visible;
    }

    #xqbj-container .xqbj-main {
        margin: 1.25rem 0 0;
    }

    #xqbj-container > .xqbj-main > .xqbj-main-container {
        box-sizing: border-box;
        margin: 0;
        padding: 0 1rem;
    }

    .history-page {
        min-width: 0;
        margin: 0;
        padding: 0;
    }

    .history-page .history-main {
        padding: 0 0.6rem 0 0.5rem;
        box-sizing: border-box;
    }

    .history-title,
    .history-aside {
        display: none;
    }

    .archive-layout {
        min-width: 0;
        padding: 0;
        display: block;
    }

    .history-years.is-mobile {
        position: sticky;
        top: var(--van-nav-bar-height);
        z-index: 8;
        margin: 0;
        padding: 0.2rem 0 0;
        display: block;
        background: var(--base-background, #f5f6fa);
    }

    .history-filter.is-mobile {
        display: flex;
    }

    .history-month-chip,
    .history-month-chip:link,
    .history-month-chip:visited,
    .history-month-chip:hover,
    .history-month-chip:active,
    .history-month-chip:focus {
        padding: 0.5rem;
    }

    .archive-list-panel {
        min-height: 24rem;
    }

    .history-fail {
        gap: 1.2rem;
        padding: 1.2rem 0 0;
    }

    .history-fail-text {
        font-size: 1.4rem;
    }
}

@media (min-width: 960px) {
    #xqbj-container.full-container .xqbj-main,
    #xqbj-container.full-container > .xqbj-main > .xqbj-main-container {
        overflow: visible;
    }

    body.date-archive-page #xqbj-container.full-container {
        --history-title-height: 3.4rem;
        --history-sidebar-width: 12.5rem;
        --history-content-gap: 1rem;
        --history-content-width: 60rem;
        --history-list-width: calc(var(--history-content-width) - var(--history-sidebar-width) - var(--history-content-gap));
    }

    .history-page {
        min-width: 45rem;
        margin: 0 auto;
        padding: 0;
        background: #f5f6fa;
    }

    .history-list-container {
        width: 100%;
        max-width: var(--history-content-width);
        margin: 0 auto;
        padding-top: calc(var(--history-title-height) + var(--history-content-gap));
        box-sizing: border-box;
    }

    .history-title {
        position: fixed;
        top: var(--van-nav-bar-height);
        right: 0;
        left: 0;
        z-index: 4;
        width: 100%;
        height: var(--history-title-height);
        margin: 0;
        padding: 0;
        display: flex;
    }

    .history-filter.is-mobile,
    .history-years.is-mobile {
        display: none;
    }

    .history-layout {
        width: 100%;
        padding-left: calc(var(--history-sidebar-width) + var(--history-content-gap));
        display: block;
        box-sizing: border-box;
    }

    .history-main {
        width: 100%;
        min-width: 0;
        gap: 1rem;
    }

    .history-aside {
        position: fixed;
        top: calc(var(--van-nav-bar-height) + var(--history-title-height) + var(--history-content-gap));
        left: max(0px, calc((100vw - var(--history-content-width)) / 2));
        z-index: 3;
        width: var(--history-sidebar-width);
        max-height: calc(100vh - var(--van-nav-bar-height) - var(--history-title-height) - var(--history-content-gap));
        display: block;
        overflow-y: auto;
        background: transparent;
    }

    .history-year-bar {
        position: relative;
        height: 2.25rem;
        background: #bb8550;
    }

    .history-year-group:first-child .history-year-bar {
        border-radius: 0.3rem 0.3rem 0 0;
    }

    .history-year-group:last-child:not(.is-open) .history-year-bar {
        border-radius: 0 0 0.3rem 0.3rem;
    }

    .history-year-group:first-child:last-child:not(.is-open) .history-year-bar {
        border-radius: 0.3rem;
    }

    .history-year-head,
    .history-year-head:link,
    .history-year-head:visited {
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #fff;
        font-size: 0.8rem;
        font-weight: 500;
        text-decoration: none;
    }

    .history-year-arrow {
        position: absolute;
        top: 50%;
        right: 0.75rem;
        width: 1rem;
        height: 1rem;
        transform: translateY(-50%) rotate(180deg);
        object-fit: contain;
        cursor: pointer;
    }

    .history-year-group.is-open .history-year-arrow {
        transform: translateY(-50%) rotate(0deg);
    }

    .history-year-months {
        margin: 0;
        padding: 0;
        display: none;
        list-style: none;
    }

    .history-year-group.is-open .history-year-months {
        display: block;
    }

    .history-month-item,
    .history-month-item:link,
    .history-month-item:visited {
        height: 2.25rem;
        display: flex;
        align-items: center;
        justify-content: center;
        background: transparent;
        color: #222;
        font-size: 0.8rem;
        font-weight: 400;
        text-decoration: none;
    }

    .history-month-item.is-current,
    .history-month-item.is-current:link,
    .history-month-item.is-current:visited {
        background: rgba(187, 133, 80, 0.5);
        color: #fff;
        font-weight: 500;
    }

    .history-content {
        scroll-margin-top: calc(var(--van-nav-bar-height) + var(--history-title-height) + var(--history-content-gap));
    }

    .history-list li + li {
        margin-top: 0.5rem;
    }

    .history-item {
        gap: 0;
    }

    .history-item-date {
        min-width: 0;
        padding: 0.5rem;
        flex: 0 0 auto;
        color: #222;
        font-size: 0.8rem;
        font-weight: 400;
        text-align: center;
    }

    .history-item-dash {
        font-size: 1rem;
    }

    .history-item-card {
        padding: 0.8rem 1rem;
        border-radius: 0.5rem;
    }

    .history-item-title {
        font-size: 1rem;
        color: #222;
    }

    .history-fail {
        min-height: 28rem;
        padding: 4rem 1rem;
        gap: 0.5rem;
    }

    .history-fail-art {
        width: 15rem;
        max-width: 15rem;
        height: 9rem;
        aspect-ratio: 300 / 180;
    }

    .history-fail-text {
        font-size: 0.9rem;
    }

    .archive-pagination .archive-page-jump-label {
        font-size: 0.7rem;
    }

    body.date-archive-page #xqbj-container.full-container .xqbj-footer {
        width: 100%;
        max-width: var(--history-content-width);
        margin: 0 auto;
        padding: 0 0 0 calc(var(--history-sidebar-width) + var(--history-content-gap));
        display: block;
        box-sizing: border-box;
    }

    body.date-archive-page #xqbj-container.full-container .xqbj-footer #xqbj-contact-container {
        width: 100%;
        max-width: var(--history-list-width);
        margin: 0;
        padding: 1rem 0 0;
    }

    body.date-archive-page #xqbj-container.full-container .xqbj-footer #xqbj-contact-container .bottom-content {
        margin-left: 0;
        padding-left: 0.5rem;
    }

    body.date-archive-page #xqbj-container.full-container .xqbj-footer #xqbj-contact-container .rank-app-group {
        gap: 0 0.8rem;
    }
}
