/* Grain Mobile Shop Menu — mobile-first drawer enhancement only. */
#grain-drawer .gmsm-shop-parent {
    border-bottom: 1px solid rgba(255,255,255,.06);
}

#grain-drawer .gmsm-parent-row {
    display: flex;
    align-items: center;
    gap: .55rem;
    min-width: 0;
}

#grain-drawer .gmsm-shop-main-link {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
}

#grain-drawer .gmsm-toggle {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid rgba(255,255,255,.11);
    border-radius: 11px;
    background: rgba(255,255,255,.055);
    color: rgba(255,255,255,.78);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

#grain-drawer .gmsm-toggle:focus-visible {
    outline: 2px solid var(--yellow, #F5C842);
    outline-offset: 2px;
}

#grain-drawer .gmsm-chevron {
    width: 9px;
    height: 9px;
    display: block;
    border-inline-end: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translate(-1px, -1px);
    transition: transform .22s ease;
}

#grain-drawer .gmsm-open .gmsm-chevron {
    transform: rotate(225deg) translate(-1px, -1px);
}

#grain-drawer .gmsm-submenu {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transform: translateY(-4px);
    transition: max-height .26s ease, opacity .2s ease, transform .26s ease, padding .26s ease;
}

#grain-drawer .gmsm-open > .gmsm-submenu {
    max-height: 330px;
    opacity: 1;
    transform: translateY(0);
    padding: .12rem 0 .7rem;
}

#grain-drawer .gmsm-submenu .gmsm-subitem {
    border: 0 !important;
    margin: 0;
    padding: 0;
}

#grain-drawer .gmsm-submenu .gmsm-sub-link {
    min-height: 46px;
    display: grid !important;
    grid-template-columns: 30px minmax(0, 1fr) 24px;
    align-items: center;
    gap: .62rem;
    margin: .28rem 0;
    padding: .66rem .78rem !important;
    border: 1px solid rgba(255,255,255,.065);
    border-radius: 12px;
    background: rgba(255,255,255,.045);
    color: rgba(255,255,255,.72) !important;
    font-size: .86rem !important;
    font-weight: 700 !important;
    line-height: 1.25;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    transition: background .18s ease, border-color .18s ease, color .18s ease;
}

#grain-drawer .gmsm-submenu .gmsm-sub-link:active,
#grain-drawer .gmsm-submenu .gmsm-sub-link:hover,
#grain-drawer .gmsm-submenu .gmsm-sub-link:focus-visible {
    background: rgba(245,200,66,.105);
    border-color: rgba(245,200,66,.23);
    color: var(--yellow, #F5C842) !important;
}

#grain-drawer .gmsm-submenu .gmsm-sub-link.is-current {
    background: rgba(245,200,66,.12);
    border-color: rgba(245,200,66,.28);
    color: var(--yellow, #F5C842) !important;
}

#grain-drawer .gmsm-sub-icon {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    background: rgba(255,255,255,.065);
    font-size: .86rem;
}

#grain-drawer .gmsm-sub-label {
    min-width: 0;
    overflow-wrap: anywhere;
}

#grain-drawer .gmsm-sub-arrow {
    opacity: .38;
    font-size: .85rem;
    text-align: center;
}

@media (max-width: 390px) {
    #grain-drawer .gmsm-parent-row {
        gap: .42rem;
    }

    #grain-drawer .gmsm-toggle {
        width: 42px;
        height: 42px;
        flex-basis: 42px;
    }

    #grain-drawer .gmsm-submenu .gmsm-sub-link {
        grid-template-columns: 28px minmax(0, 1fr) 20px;
        gap: .5rem;
        padding: .62rem .68rem !important;
        font-size: .82rem !important;
    }

    #grain-drawer .gmsm-sub-icon {
        width: 28px;
        height: 28px;
    }
}

@media (prefers-reduced-motion: reduce) {
    #grain-drawer .gmsm-chevron,
    #grain-drawer .gmsm-submenu {
        transition: none !important;
    }
}
