/* 社区移动端汉堡菜单 v1.0  2026-11-22
 * 标记由 /bbs/mobile_menu.php 输出；须置于 style.css / mobile-nav.css 之后。
 * 仅 <=768px 生效；桌面端完全不影响原有 .nav 布局。 */
.mm-btn, .mm-mask, .mm-panel { display: none; }
@media (max-width: 768px) {
    /* 顶部汉堡按钮：固定于页头右侧（页头高约 54px） */
    .mm-btn {
        display: flex; position: fixed; top: 7px; right: 10px; z-index: 1040;
        width: 42px; height: 40px; padding: 0; border: 0; border-radius: 10px;
        background: transparent; flex-direction: column; align-items: center;
        justify-content: center; gap: 5px; cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }
    .mm-btn:active { background: rgba(6, 195, 96, .14); }
    .mm-bar {
        display: block; width: 20px; height: 2px; border-radius: 2px;
        background: #2F3742; transition: transform .22s ease, opacity .18s ease;
    }
    .mm-btn[aria-expanded="true"] .mm-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .mm-btn[aria-expanded="true"] .mm-bar:nth-child(2) { opacity: 0; }
    .mm-btn[aria-expanded="true"] .mm-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
    /* 遮罩 */
    .mm-mask {
        display: block; position: fixed; top: 0; right: 0; bottom: 0; left: 0;
        z-index: 1050; background: rgba(17, 24, 39, .46); opacity: 0;
        transition: opacity .24s ease;
    }
    .mm-mask[hidden] { display: none; }
    .mm-mask.mm-show { opacity: 1; }
    /* 抽屉面板 */
    .mm-panel {
        display: flex; position: fixed; top: 0; right: 0; bottom: 0; z-index: 1060;
        width: 78vw; max-width: 320px; background: #fff;
        box-shadow: -10px 0 28px rgba(17, 24, 39, .2);
        flex-direction: column; transform: translateX(100%);
        transition: transform .26s ease;
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }
    .mm-panel[hidden] { display: none; }
    .mm-panel.mm-show { transform: translateX(0); }
    .mm-panel.mm-arming { pointer-events: none; }
    .mm-head {
        display: flex; align-items: center; justify-content: space-between;
        padding: 14px 16px; border-bottom: 1px solid #EEF1F4; flex: 0 0 auto;
    }
    .mm-title { font-size: 15px; font-weight: 600; color: #1F2937; }
    .mm-close {
        width: 34px; height: 34px; border: 0; border-radius: 8px;
        background: #F3F5F7; color: #4B5563; font-size: 20px; line-height: 1;
        cursor: pointer; -webkit-tap-highlight-color: transparent;
    }
    .mm-close:active { background: #E5E9EE; }
    .mm-list {
        list-style: none; margin: 0; padding: 6px 0; overflow-y: auto;
        -webkit-overflow-scrolling: touch; flex: 1 1 auto;
    }
    .mm-list li { margin: 0; }
    .mm-link {
        display: block; padding: 13px 18px; font-size: 15px; color: #374151;
        text-decoration: none; border-left: 3px solid transparent;
        transition: background .16s ease, color .16s ease;
        -webkit-tap-highlight-color: transparent;
    }
    .mm-link:active { background: #F2FBF6; }
    .mm-link.mm-active {
        color: #059653; font-weight: 600; background: #F2FBF6;
        border-left-color: #06c360;
    }
    .mm-foot {
        flex: 0 0 auto; border-top: 1px solid #EEF1F4;
        padding: 10px 12px 14px; display: flex; gap: 8px;
    }
    .mm-foot-link {
        flex: 1 1 0; text-align: center; padding: 10px 6px; border-radius: 9px;
        background: #F3F5F7; color: #374151; font-size: 14px; text-decoration: none;
        overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    }
    .mm-foot-link.mm-quit { color: #B91C1C; background: #FDF2F2; }
    /* 抽屉打开时锁住背景滚动 */
    body.mm-lock { overflow: hidden; }
}
