
#pkDrawerLayer,
#pkDrawerLayer * {
    box-sizing: border-box;
}

#pkDrawerLayer {
    position: fixed;
    z-index: 2147483646;
    inset: 0;
    visibility: hidden;
    pointer-events: none;
    transition: visibility .28s ease;
    color: #fff5e5;
    font-family: inherit;
}

#pkDrawerLayer[hidden] {
    display: none !important;
}

#pkDrawerLayer.is-open {
    visibility: visible;
    pointer-events: auto;
}

body.pk-drawer-open {
    overflow: hidden !important;
}

#pkDrawerBackdrop {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: rgba(0, 0, 0, .76);
    opacity: 0;
    transition: opacity .28s ease;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

#pkDrawerLayer.is-open #pkDrawerBackdrop {
    opacity: 1;
}

#pkDrawerPanel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    width: min(370px, 84vw);
    max-width: 430px;
    min-height: 100%;
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    overflow: hidden;
    border-left: 1px solid rgba(245, 197, 66, .5);
    background:
        radial-gradient(ellipse at 90% 0, rgba(180, 24, 36, .22), transparent 42%),
        linear-gradient(180deg, #29090c 0%, #16090a 55%, #100708 100%);
    box-shadow: -18px 0 50px rgba(0, 0, 0, .55);
    transform: translateX(102%);
    transition: transform .28s cubic-bezier(.2, .75, .25, 1);
    overscroll-behavior: contain;
}

#pkDrawerLayer.is-open #pkDrawerPanel {
    transform: translateX(0);
}

.pk-drawer-header {
    position: relative;
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: space-between;
    min-height: 58px;
    padding: 8px 16px;
    border-bottom: 1px solid rgba(245, 197, 66, .35);
    background: linear-gradient(100deg, #8d101a, #4b090e 75%, #21090b);
}

.pk-drawer-title {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    color: #fff5e5;
    font-size: 16px;
    font-weight: 700;
}

.pk-drawer-title img {
    display: block;
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.pk-drawer-close {
    display: grid;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(245, 197, 66, .55);
    border-radius: 50%;
    color: #f5c542;
    background: rgba(20, 5, 7, .7);
    font-size: 17px;
    cursor: pointer;
}

.pk-drawer-close:hover,
.pk-drawer-close:focus-visible {
    color: #fff;
    background: #a51b27;
    outline: 2px solid rgba(245, 197, 66, .65);
    outline-offset: 2px;
}

.pk-drawer-scroll {
    flex: 1 1 auto;
    min-height: 0;
    padding: 14px 14px 10px;
    overflow: auto;
    overscroll-behavior: contain;
    scrollbar-color: rgba(245, 197, 66, .55) transparent;
    scrollbar-width: thin;
}

.pk-drawer-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px;
    border: 1px solid rgba(245, 197, 66, .48);
    border-radius: 16px;
    background: linear-gradient(145deg, #641018, #300b0f 75%, #1b090b);
    box-shadow: 0 8px 22px rgba(0, 0, 0, .28);
}

.pk-drawer-avatar {
    display: grid;
    flex: 0 0 54px;
    width: 54px;
    height: 54px;
    place-items: center;
    overflow: hidden;
    border: 2px solid #f5c542;
    border-radius: 15px;
    background: #3b0b10;
}

.pk-drawer-avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pk-drawer-profile-copy {
    min-width: 0;
}

.pk-drawer-rank {
    display: block;
    margin-bottom: 3px;
    color: #f5c542;
    font-size: 11px;
    font-weight: 700;
}

.pk-drawer-name {
    display: block;
    overflow: hidden;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pk-drawer-phone {
    display: block;
    margin-top: 3px;
    color: #d4bfc0;
    font-size: 12px;
}

.pk-drawer-balance {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 11px;
    padding: 11px 13px;
    border: 1px solid rgba(245, 197, 66, .38);
    border-radius: 13px;
    color: #eadcce;
    background: rgba(12, 5, 6, .78);
    font-size: 13px;
}

.pk-drawer-balance strong {
    color: #f5c542;
    font-size: 17px;
    font-variant-numeric: tabular-nums;
}

.pk-drawer-money-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    margin-top: 10px;
}

.pk-drawer-money-actions button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 45px;
    padding: 8px;
    border: 1px solid rgba(245, 197, 66, .7);
    border-radius: 12px;
    color: #fff8e9;
    background: linear-gradient(135deg, #c42b35, #82101a);
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: transform .16s ease, filter .16s ease;
}

.pk-drawer-money-actions button:last-child {
    border-color: rgba(245, 197, 66, .35);
    color: #f5c542;
    background: linear-gradient(135deg, #3b1014, #1a090b);
}

.pk-drawer-money-actions button:hover {
    filter: brightness(1.15);
    transform: translateY(-1px);
}

.pk-drawer-section {
    margin-top: 18px;
}

.pk-drawer-section-title {
    margin: 0 0 9px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .25px;
}

.pk-drawer-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
}

.pk-drawer-item {
    display: flex;
    min-width: 0;
    min-height: 76px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 8px 4px;
    border: 1px solid rgba(245, 197, 66, .16);
    border-radius: 13px;
    color: #f4e8df;
    background: linear-gradient(145deg, rgba(100, 17, 25, .38), rgba(24, 9, 11, .88));
    font: inherit;
    font-size: 11px;
    line-height: 1.25;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: border-color .16s ease, background .16s ease, transform .16s ease;
    -webkit-tap-highlight-color: transparent;
}

.pk-drawer-item i {
    color: #dc3545;
    font-size: 21px;
}

.pk-drawer-item:hover,
.pk-drawer-item:focus-visible {
    border-color: rgba(245, 197, 66, .75);
    color: #fff;
    background: linear-gradient(145deg, rgba(165, 27, 39, .55), rgba(50, 10, 14, .95));
    outline: none;
    transform: translateY(-1px);
}

.pk-drawer-footer {
    display: grid;
    flex: 0 0 auto;
    gap: 8px;
    padding: 10px 14px calc(12px + env(safe-area-inset-bottom));
    border-top: 1px solid rgba(245, 197, 66, .24);
    background: rgba(15, 6, 7, .96);
}

.pk-drawer-footer-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 8px 12px;
    border: 1px solid rgba(245, 197, 66, .3);
    border-radius: 11px;
    color: #f4e4d7 !important;
    background: rgba(80, 14, 20, .35);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none !important;
}

.pk-drawer-footer-link.pk-drawer-primary {
    border-color: rgba(245, 197, 66, .6);
    color: #fff8e9 !important;
    background: linear-gradient(135deg, #c42b35, #82101a);
}

.pk-drawer-footer-link.pk-drawer-logout {
    color: #e9b9b9 !important;
    border-color: rgba(190, 55, 65, .4);
}

@media (min-width: 768px) {
    #pkDrawerPanel {
        width: min(390px, 90vw);
    }
}

@media (prefers-reduced-motion: reduce) {
    #pkDrawerLayer,
    #pkDrawerBackdrop,
    #pkDrawerPanel,
    .pk-drawer-item,
    .pk-drawer-money-actions button {
        transition: none !important;
    }
}
