/* archives H5 memora 日期选择器（仅移动端） */
@media screen and (max-width: 767.98px) {
    .ui-widget-header {
        border: none !important;
    }

    .ui-datepicker {
        background-color: #1e1e1e !important;
        border: 1px solid #f33861 !important;
        color: #fff !important;
        border-radius: 0.6rem;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
        padding: 0.5rem;
        width: clamp(220px, 70vw, 284px) !important;
        height: auto !important;
        transform-origin: top center;
        overflow-x: hidden;
        position: absolute !important;
        overflow: visible !important;
        z-index: 10010 !important;
        --dp-caret-left: 50%;
    }

    .ui-datepicker::before,
    .ui-datepicker::after {
        all: initial;
        content: "";
        position: absolute;
        display: block;
        pointer-events: none;
        width: 28px;
        height: 12px;
        left: var(--dp-caret-left);
        transform: translateX(-50%);
        clip-path: polygon(50% 0, 0 100%, 100% 100%);
        box-sizing: border-box;
    }

    .ui-datepicker::before {
        top: -12px;
        background: #373737 !important;
        z-index: 0;
    }

    .ui-datepicker::after {
        top: -11px;
        width: 26px;
        height: 11px;
        background: #1e1e1e !important;
        z-index: 1;
    }

    .ui-datepicker-header {
        background: none !important;
        color: #fff !important;
        border: none;
        padding: 0.6rem 0;
        font-weight: 600;
        font-size: 1rem;
        position: relative;
    }

    .ui-datepicker-prev,
    .ui-datepicker-next {
        color: #f33861 !important;
        background: transparent !important;
        border: none !important;
        position: absolute;
        top: 0.65rem !important;
        width: 1.2rem !important;
        height: 1.2rem !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        cursor: pointer;
        font-weight: bold;
    }

    .ui-datepicker-prev {
        left: 0.5rem;
    }

    .ui-datepicker-next {
        right: 0.5rem;
    }

    .ui-datepicker-prev:hover,
    .ui-datepicker-next:hover {
        opacity: 0.8;
    }

    .ui-datepicker-calendar {
        width: 100% !important;
        border-collapse: collapse !important;
        table-layout: fixed !important;
        margin: 0 auto !important;
    }

    .ui-datepicker-calendar th {
        color: rgba(255, 255, 255, 0.6);
        font-weight: 500;
        padding: 0.3rem 0;
        width: 100% !important;
    }

    .ui-datepicker-calendar th,
    .ui-datepicker-calendar td {
        padding: 0 !important;
        text-align: center !important;
        vertical-align: middle !important;
    }

    .ui-datepicker table {
        border-collapse: separate !important;
        border-spacing: clamp(4px, 1.5vw, 8px) !important;
        margin: 0 auto;
    }

    .ui-datepicker th,
    .ui-datepicker td {
        padding: 0 !important;
        border: 0 !important;
    }

    .ui-datepicker .ui-state-default {
        display: flex !important;
        align-items: center;
        justify-content: center;
        line-height: 1 !important;
        font-size: clamp(12px, 3.2vw, 15px) !important;
        background-color: #323232 !important;
        border: none !important;
        color: #e0e0e0 !important;
        border-radius: 8px;
        transition: background-color 0.2s ease;
        aspect-ratio: 1 / 1 !important;
        box-sizing: border-box !important;
    }

    .ui-datepicker .ui-state-default:hover {
        background-color: #3a3a3a !important;
    }

    .ui-datepicker .ui-state-active {
        border: 1px solid #f33861 !important;
        background-color: rgba(243, 56, 97, 0.1) !important;
        color: #f33861 !important;
        font-weight: 600 !important;
        box-shadow: none !important;
    }

    .ui-datepicker .ui-state-highlight {
        color: inherit !important;
        background-color: inherit !important;
    }

    .ui-datepicker .ui-datepicker-unselectable .ui-state-default,
    .ui-datepicker .ui-datepicker-other-month .ui-state-default,
    .ui-datepicker .ui-datepicker-other-month span {
        background-color: #1b1b1b !important;
        border: none !important;
        color: rgba(255, 255, 255, 0.32) !important;
    }

    .ui-datepicker-buttonpane {
        margin-top: 0.6rem !important;
        border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
        padding-top: 0.6rem !important;
        display: flex;
        justify-content: space-between;
        background: none !important;
    }

    .ui-datepicker-close,
    .ui-datepicker-current {
        background-color: transparent !important;
        color: #fff !important;
        border: 1px solid #555 !important;
        border-radius: 6px !important;
        cursor: pointer !important;
        font-weight: 500 !important;
        font-size: 0.85rem !important;
        line-height: 1 !important;
        width: 60px !important;
        height: 26px !important;
        padding: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        box-sizing: border-box !important;
        transition: all 0.2s ease-in-out;
    }

    .ui-datepicker-close:hover,
    .ui-datepicker-current:hover {
        background-color: transparent !important;
        color: #f33861 !important;
        border-color: #f33861 !important;
    }

    .ui-datepicker .ui-icon {
        background: none !important;
        width: 0 !important;
        height: 0 !important;
        border: solid #f33861;
        border-width: 0 2px 2px 0;
        display: inline-block;
        padding: 4px;
        margin-top: 2px;
        transform: rotate(135deg);
        transition: opacity 0.2s ease;
    }

    .ui-datepicker .ui-datepicker-next .ui-icon {
        transform: rotate(-45deg);
    }

    .ui-datepicker .ui-datepicker-prev:hover .ui-icon,
    .ui-datepicker .ui-datepicker-next:hover .ui-icon {
        opacity: 0.8;
    }
}
