.winter-profile-cover {
    position: relative; isolation: isolate; overflow: hidden;
    background: #d7e9f8 url('/assets/new-year/festival-sky.webp') center 53% / cover no-repeat;
}
.winter-profile-pins { position: absolute; inset: 0; pointer-events: none; }
.winter-profile-pins img {
    position: absolute; width: clamp(2.4rem, 13%, 4.1rem); height: auto;
    filter: drop-shadow(0 5px 9px #29487836); transform: rotate(-14deg);
}
.winter-profile-pins img:nth-child(1) { top: 33%; left: 13%; }
.winter-profile-pins img:nth-child(2) { top: 20%; right: 12%; transform: rotate(12deg); }
.winter-profile-pins img:nth-child(3) { bottom: 8%; right: 22%; transform: rotate(-10deg); }
#profileOverlay:has(.winter-profile-home, .winter-profile-collection, .winter-profile-settings, .profile-session-list, .profile-request-page, .profile-detail) .profile-sheet {
    --profile-art-height: calc(min(460px, 100vw - 36px) * 527 / 941);
    --profile-art-space: clamp(71px, 14dvh, 113px);
    --profile-avatar-size: clamp(68px, 11dvh, 88px);
    --profile-top-inset: 12px;
    position: relative; isolation: isolate; width: min(460px, 100%);
    height: 100dvh; max-height: 100dvh; border-radius: 0;
    padding: var(--profile-top-inset) 16px 10px; border: 0;
    background: #fff;
}
#profileOverlay:has(.winter-profile-home, .winter-profile-collection, .winter-profile-settings, .profile-session-list, .profile-request-page, .profile-detail) {
    padding-block: 0;
}
#profileOverlay:has(.winter-profile-home.is-winter) .profile-sheet::before {
    content: ''; position: absolute; z-index: -1; inset: 0 0 auto; height: var(--profile-art-height);
    background: url('/assets/new-year/profile-header.jpg') center / cover no-repeat;
    -webkit-mask-image: linear-gradient(#000 80%, transparent);
    mask-image: linear-gradient(#000 80%, transparent);
    pointer-events: none;
}
#profileOverlay:has(.winter-profile-home:not(.is-winter)) .profile-sheet::before {
    content: ''; position: absolute; z-index: -1; inset: 0 0 auto; height: var(--profile-art-height);
    background: linear-gradient(155deg, #cfe7f5, #eaf3fb 57%, #fff); pointer-events: none;
}
#profileOverlay:has(.winter-profile-home, .winter-profile-collection, .winter-profile-settings, .profile-session-list, .profile-request-page, .profile-detail) .profile-head {
    min-height: 44px; margin: 0 0 7px; color: #14283e;
}
#profileOverlay:has(.winter-profile-home, .winter-profile-collection, .winter-profile-settings, .profile-session-list, .profile-request-page, .profile-detail) .profile-head .modal-button {
    background: #eef5fb; color: #243d55;
}
#profileOverlay:has(.winter-profile-home.is-winter) .profile-head { margin-bottom: 0; }
#profileOverlay:has(.winter-profile-home.is-winter) .profile-head .modal-button { background: #f6fbffb3; }
#profileTitle:focus { outline: none; }
#profileContent:has(.winter-profile-home) { min-height: 0; }
.winter-profile-home { display: flex; flex-direction: column; min-height: 100%; color: #14283e; }
.winter-profile-identity-column, .winter-profile-menu { display: contents; }
.winter-profile-home .winter-profile-cover { height: var(--profile-art-space); background: transparent; overflow: visible; }
.winter-profile-home.is-winter .winter-profile-cover {
    height: calc(var(--profile-art-height) * .9 - var(--profile-top-inset) - 44px);
}
.winter-profile-home .profile-identity { position: relative; gap: 2px; padding: 0 8px 9px; margin-top: -29px; }
.winter-profile-home.is-winter .profile-identity { margin-top: calc(-.5 * var(--profile-avatar-size)); }
.winter-profile-home .profile-avatar, .winter-player-avatar {
    display: grid; place-items: center; width: 100px; height: 100px; flex-basis: 100px; border-radius: 50%;
    overflow: hidden; background: #173a53; color: #fff;
    box-shadow: 0 0 0 5px #fff, 0 8px 24px #20436b44; font-size: 30px; font-weight: 800;
}
.winter-profile-home .profile-avatar img, .winter-player-avatar img { width: 100%; height: 100%; object-fit: cover; }
.winter-profile-home .profile-avatar {
    width: var(--profile-avatar-size); height: var(--profile-avatar-size); flex-basis: var(--profile-avatar-size);
}
.winter-profile-home .profile-identity-name { font-size: clamp(21px, 5.8vw, 27px); margin-top: 4px; color: #14283e; line-height: 1.15; }
.winter-profile-home .profile-identity-handle { font-size: .83rem; line-height: 1.3; }
.winter-profile-link, .winter-profile-home .profile-settings-entry {
    display: grid; grid-template-columns: 30px minmax(0, 1fr) auto 18px; align-items: center; gap: 12px;
    min-height: clamp(44px, 6dvh, 53px); width: 100%; padding: 5px 9px; border: 0; border-radius: 0;
    background: transparent; color: #18324a; font: inherit; font-weight: 720; text-align: start; text-decoration: none; cursor: pointer;
}
.winter-profile-link > svg, .winter-profile-home .profile-section-head svg { width: 22px; height: 22px; color: #486982; }
.winter-profile-link > svg:last-child { width: 17px; justify-self: end; grid-column: 4; }
.winter-profile-tree { margin-bottom: 2px; background: #e3f3eb; border-radius: 14px; color: #174e34; }
.winter-profile-tree > svg { color: #236a49; }
.winter-profile-score { border-radius: 15px; padding: 4px 9px; background: #d1eadb; white-space: nowrap; font-size: .82rem; }
.winter-profile-home .profile-section-link { border-top: 1px solid #e6edf2; }
.profile-request-page { padding: 5px 0 12px; }
.profile-request-page, .profile-detail { animation: profile-page-in .2s ease-out both; }
.profile-request-page .profile-row { background: #f6faff; border-color: #e0ebf4; }
.profile-request-page .profile-row:hover { background: #eef6fc; }
@keyframes profile-page-in { from { opacity: 0; transform: translateX(9px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .profile-request-page, .profile-detail { animation: none; } }
.winter-profile-home .profile-settings-entry { grid-template-columns: 30px minmax(0, 1fr) auto; border-top: 1px solid #e6edf2; }
.winter-profile-home .profile-settings-entry-icon { width: 26px; height: 26px; background: transparent; color: #486982; }
.winter-profile-home .profile-top-actions {
    display: flex; flex-wrap: wrap; gap: 6px; margin: auto 0 0; padding-top: 7px; border-top: 1px solid #e6edf2;
}
.winter-profile-home .profile-top-actions > :is(a, button) { flex: 1 1 auto; min-height: 44px; font-size: .85rem; }
.winter-profile-home .profile-top-actions svg { width: 17px; height: 17px; }
@media (max-width: 700px), (orientation: landscape) and (max-height: 500px) and (max-width: 932px) {
    #profileOverlay:has(.winter-profile-home, .winter-profile-collection, .winter-profile-settings, .profile-session-list, .profile-request-page, .profile-detail) { padding: 0; }
    #profileOverlay:has(.winter-profile-home, .winter-profile-collection, .winter-profile-settings, .profile-session-list, .profile-request-page, .profile-detail) .profile-sheet {
        --profile-art-height: calc(100vw * 527 / 941);
        --profile-top-inset: max(4px, env(safe-area-inset-top));
        width: 100%; height: 100dvh; max-height: 100dvh; border-radius: 0; box-shadow: none;
        padding: var(--profile-top-inset) max(12px, env(safe-area-inset-right))
            max(6px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
    }
}
@media (orientation: landscape) and (max-height: 500px) and (max-width: 932px) {
    #profileOverlay:has(.winter-profile-home) .profile-sheet { --profile-art-height: 44dvh; }
    #profileOverlay:has(.winter-profile-home.is-winter) .profile-sheet::before { background-position: center 70%; }
}
@media (min-width: 701px) and (min-height: 501px), (min-width: 933px) {
    #profileOverlay:has(.winter-profile-home, .winter-profile-collection, .winter-profile-settings, .profile-session-list, .profile-request-page, .profile-detail) .profile-sheet {
        width: min(560px, 100%); height: auto; max-height: min(760px, calc(100dvh - 40px));
        padding: 18px; border-radius: 24px;
    }
    #profileOverlay:has(.winter-profile-home) .profile-sheet { width: min(740px, 100%); }
    #profileOverlay:has(.profile-detail) .profile-sheet { height: min(620px, calc(100dvh - 40px)); }
    #profileOverlay:has(.winter-profile-home, .winter-profile-collection, .winter-profile-settings, .profile-session-list, .profile-request-page, .profile-detail) #profileContent { min-height: 0; }
    #profileOverlay:has(.winter-profile-home) .profile-sheet::before { display: none; }
    #profileOverlay:has(.winter-profile-home) .profile-head { margin-bottom: 12px; }
    .winter-profile-home {
        display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
        align-items: start; gap: 20px; min-height: 0;
    }
    .winter-profile-identity-column {
        display: block; overflow: hidden; min-width: 0; border-radius: 18px;
        background: linear-gradient(#edf6fc, #f8fbfe);
    }
    .winter-profile-home .winter-profile-cover {
        height: auto; aspect-ratio: 941 / 527; overflow: hidden;
        background: linear-gradient(155deg, #cce5f7, #edf6fc);
    }
    .winter-profile-home.is-winter .winter-profile-cover { height: auto; background: transparent; }
    .winter-profile-home.is-winter .winter-profile-cover::before {
        content: ''; position: absolute; z-index: -1; inset: 0; pointer-events: none;
        background: url('/assets/new-year/profile-header.jpg') center / cover no-repeat;
        -webkit-mask-image: linear-gradient(#000 84%, transparent);
        mask-image: linear-gradient(#000 84%, transparent);
    }
    .winter-profile-home .profile-identity { padding-bottom: 20px; }
    .winter-profile-home .profile-identity-name { overflow-wrap: anywhere; }
    .winter-profile-menu { display: block; min-width: 0; }
    .winter-profile-home .profile-top-actions { margin-top: 8px; }
}
@media (display-mode: standalone) and (pointer: coarse) {
    html:has(#profileOverlay.visible :is(.winter-profile-home, .winter-profile-collection, .winter-profile-settings, .profile-session-list, .profile-request-page, .profile-detail)) body::before { background: #e6f0f8; }
    html:has(#profileOverlay.visible .winter-profile-home.is-winter) body::before { background: #abcaf0; }
    html:has(#profileOverlay.visible :is(.winter-profile-home, .winter-profile-collection, .winter-profile-settings, .profile-session-list, .profile-request-page, .profile-detail)) body::after { background: #fff; }
}
.winter-player-sheet:not(.is-winter) .winter-profile-cover {
    background: linear-gradient(140deg, #d6ebfb, #f8fbff);
}
.winter-profile-settings .profile-settings-entry, .winter-profile-settings .profile-push-setting, .profile-session-row {
    border-color: #e0ebf4; background: #f5faff; color: #18324a; border-radius: 16px;
}
.winter-profile-settings .profile-settings-entry-icon, .winter-profile-settings .profile-push-icon,
.profile-session-row .profile-settings-entry-icon {
    background: #e2eff8; color: #315872;
}
.winter-collection-cover {
    aspect-ratio: 1250 / 703; border-radius: 19px;
    background: #d7e9f8 url('/assets/new-year/collection-header.jpg') center / cover no-repeat;
}
.winter-profile-collection p { margin: 12px 0; color: #47657a; font-size: .9rem; }
.winter-profile-collection .winter-collection-progress { color: #24664d; font-weight: 720; }
.winter-profile-collection [role="status"]:empty { display: none; }
.winter-collection-empty { display: grid; justify-items: center; padding: 34px 12px; text-align: center; }
.winter-collection-empty[hidden] { display: none; }
.winter-collection-empty p { font-weight: 650; color: #294762; }
.winter-empty-gift, .winter-empty-star { transform-box: fill-box; transform-origin: center; animation: winter-gift-float 2.9s ease-in-out infinite paused; }
.winter-empty-star { animation-name: winter-gift-twinkle; }
.winter-collection-empty.is-visible :is(.winter-empty-gift, .winter-empty-star) { animation-play-state: running; }
.winter-gifts h4 { margin: 10px 0 7px; font-size: .79rem; color: #526e83; text-align: start; }
.winter-gift-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 8px; }
.winter-gift {
    display: grid; justify-items: center; align-content: start; gap: 4px; min-width: 0;
    padding: 9px 5px; text-align: center; border: 1px solid #e0eaf4; border-radius: 15px;
    background: #edf5fb; color: #17344e; font: inherit;
}
button.winter-gift { cursor: pointer; }
.winter-profile-collection button.winter-gift { padding-block: 13px 10px; }
.winter-profile-collection button.winter-gift img {
    width: 74px; height: 74px; animation: winter-gift-float 3s ease-in-out infinite paused;
    filter: drop-shadow(0 6px 6px #35547727);
}
.winter-profile-collection button.winter-gift.is-visible img { animation-play-state: running; }
.winter-gift.is-pinned { background: #e0f2e9; border-color: #a4d5ba; }
.winter-gift img { width: 50px; height: 50px; object-fit: contain; }
.winter-gift strong { font-size: .82rem; line-height: 1.2; }
.winter-gift small { font-size: .7rem; color: #4a6379; }
.apk-game-rank-row > button {
    appearance: none; display: grid; grid-template-columns: 24px 34px minmax(0, 1fr) auto 13px;
    grid-column: 1 / -1; align-items: center; gap: 7px; width: 100%; border: 0;
    background: transparent; color: inherit; font: inherit; text-align: start; padding: 3px 0; cursor: pointer;
}
.apk-game-rank-row > button > svg { width: 13px; height: 13px; color: #638578; }
.winter-player-sheet {
    position: fixed; inset: auto 0 0; margin: 0 auto; width: min(100%, 500px); max-width: 100%;
    max-height: min(80dvh, 590px); padding: 0; border: 0; border-radius: 26px 26px 0 0;
    background: #f9fcff; color: #17344e; box-shadow: 0 -12px 60px #102f5140; overscroll-behavior: contain;
}
.winter-player-sheet[open] { animation: winter-player-rise .28s cubic-bezier(.16, 1, .3, 1) both; }
.winter-player-sheet::backdrop { background: #19304b55; backdrop-filter: blur(3px); }
.winter-item-sheet {
    position: relative; width: min(390px, calc(100% - 24px)); max-width: 100%; max-height: 90dvh;
    padding: 18px; border: 0; border-radius: 24px; color: #18324a; background: #f9fcff;
    font: inherit; box-shadow: 0 14px 44px #15395b36; overscroll-behavior: contain;
}
.winter-item-sheet[open] { animation: winter-item-in .25s ease-out both; }
.winter-item-sheet::backdrop { background: #19304b61; backdrop-filter: blur(4px); }
.winter-item-sheet h2 { margin: 4px 44px 12px 0; font-size: 1.23rem; overflow-wrap: anywhere; }
.winter-item-art { display: grid; place-items: center; height: clamp(95px, 23dvh, 154px); border-radius: 16px; background: radial-gradient(ellipse, #fff, #e6f4fb 70%, #eaf3fa); }
.winter-item-art img { width: auto; height: 74%; max-width: 74%; object-fit: contain; animation: winter-gift-float 3s ease-in-out infinite; filter: drop-shadow(0 8px 8px #35547732); }
.winter-item-info { margin: 10px 0; }
.winter-item-info div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid #e1edf6; }
.winter-item-info dt { color: #4a6379; }
.winter-item-info dd { margin: 0; font-weight: 700; text-align: end; }
.winter-item-pin { display: flex; justify-content: center; align-items: center; gap: 8px; width: 100%; min-height: 44px; border: 0; border-radius: 12px; background: #185841; color: #fff; font: inherit; font-weight: 720; cursor: pointer; }
.winter-item-pin:disabled { opacity: .7; cursor: wait; }
.winter-item-status { margin: 9px 0 0; font-size: .82rem; color: #365b73; }
.winter-item-status:empty { display: none; }
@keyframes winter-item-in { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes winter-gift-float { 0%, 100% { transform: translateY(2px) rotate(-5deg); } 50% { transform: translateY(-4px) rotate(5deg); } }
@keyframes winter-gift-twinkle { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
    .winter-item-sheet[open], .winter-item-art img, .winter-profile-collection button.winter-gift img,
    .winter-empty-gift, .winter-empty-star { animation: none; }
}
.winter-player-body { padding: 0 16px max(18px, env(safe-area-inset-bottom)); text-align: center; }
.winter-player-cover { margin-inline: -16px; height: 127px; }
.winter-player-sheet.is-winter .winter-player-cover {
    height: auto; aspect-ratio: 941 / 527; background: transparent;
}
.winter-player-sheet.is-winter .winter-player-cover::before {
    content: ''; position: absolute; z-index: -1; inset: 0;
    background: url('/assets/new-year/profile-header.jpg') center / cover no-repeat;
    -webkit-mask-image: linear-gradient(#000 84%, transparent);
    mask-image: linear-gradient(#000 84%, transparent);
}
.winter-player-close {
    position: absolute; z-index: 1; inset: 12px 12px auto auto; width: 42px; height: 42px;
    display: grid; place-items: center; border: 0; border-radius: 50%; background: #fffdfd; color: #24485e;
    font-size: 27px; cursor: pointer;
}
.winter-player-avatar { position: relative; margin: -38px auto 8px; width: 76px; height: 76px; font-size: 23px; }
.winter-player-avatar img { position: absolute; inset: 0; }
.winter-player-body h2 { margin: 0 0 12px; font-size: clamp(1.25rem, 6vw, 1.7rem); overflow-wrap: anywhere; }
.winter-player-body h3 { margin: 13px 0 8px; font-size: .95rem; text-align: start; }
.winter-player-stats { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 5px; padding: 9px 3px; border-radius: 12px; background: #eaf3fb; }
.winter-player-stats div { display: grid; gap: 2px; }
.winter-player-stats[hidden] { display: none; }
.winter-player-member { margin: -4px 0 10px; color: #526e83; font-size: .83rem; }
.winter-player-stats span, .winter-gift-empty { color: #4a6379; font-size: .78rem; }
.winter-gift-empty { text-align: start; }
.winter-gift-empty:empty { display: none; }
button.comment-user { padding: 0; border: 0; background: transparent; color: inherit; text-align: start; font: inherit; cursor: pointer; }
.profile-collectible { display: inline-grid; place-items: center; margin: 3px 8px; width: 44px; height: 44px; padding: 4px; background: #edf5fbd9; border: 0; border-radius: 14px; cursor: pointer; }
.profile-collectible img { width: 34px; height: 34px; object-fit: contain; filter: drop-shadow(0 3px 5px #40608536); }
.profile-collectible-status { display: inline-block; font-size: .8rem; color: #265a44; }
@keyframes winter-player-rise { from { transform: translateY(100%); } to { transform: translateY(0); } }
@media (min-width: 701px) { .winter-player-sheet { bottom: 14px; border-radius: 26px; } }
@media (prefers-reduced-motion: reduce) { .winter-player-sheet[open] { animation: none; } }
