/* 固定フッターナビより前面に表示し、画面高が低い端末でも全項目を選択可能にする */
.melody-flag-menu-modal{position:fixed;inset:0;z-index:30000;display:none;overflow:hidden}
.melody-flag-menu-modal.is-open{display:block}
.melody-flag-menu-overlay{position:absolute;inset:0;background:rgba(0,0,0,.38)}
.melody-flag-menu-panel{
    position:absolute;top:62px;right:10px;
    width:min(340px,calc(100vw - 20px));
    max-height:calc(100dvh - 82px - env(safe-area-inset-bottom));
    overflow-x:hidden;overflow-y:auto;
    overscroll-behavior:contain;-webkit-overflow-scrolling:touch;
    padding:12px;box-sizing:border-box;border-radius:20px;border:1px solid var(--theme-border-soft);
    background:#fff;box-shadow:0 12px 32px rgba(61,44,46,.18);
}
.melody-flag-menu-header{display:flex;align-items:center;justify-content:space-between;min-height:40px;padding:0 4px 10px 8px}
.melody-flag-menu-header h2{display:flex;align-items:center;gap:10px;margin:0;color:var(--theme-heading);font-size:16px;font-weight:bold}
.melody-flag-menu-header h2::before{content:"";flex:0 0 auto;width:5px;height:20px;border-radius:3px;background:linear-gradient(180deg,var(--theme-btn-from),var(--theme-primary))}
.melody-flag-menu-close{display:flex;align-items:center;justify-content:center;width:36px;height:36px;padding:0;border:0;border-radius:50%;background:var(--theme-tint);color:var(--theme-text-sub);font:inherit;font-size:24px;cursor:pointer}
.melody-flag-menu-list{display:flex;flex-direction:column;gap:4px}
.melody-flag-menu-item{display:flex;align-items:center;gap:12px;min-height:52px;padding:0 12px 0 8px;border-radius:12px;color:var(--theme-text);text-decoration:none;font-size:14.5px;font-weight:600}
.melody-flag-menu-item:hover{background:var(--theme-blush)}
.melody-flag-menu-item:active{background:var(--theme-blush)}
.melody-flag-menu-item[aria-current="page"]{background:var(--theme-blush);color:var(--theme-brand)}
.melody-flag-menu-icon{display:flex;align-items:center;justify-content:center;flex:0 0 36px;width:36px;height:36px;border-radius:10px;background:var(--theme-blush);color:var(--theme-brand)}
.melody-flag-menu-item[aria-current="page"] .melody-flag-menu-icon{background:#fff}
.melody-flag-menu-icon svg{width:20px;height:20px}
.melody-flag-menu-label{flex:1;min-width:0}
.melody-flag-menu-arrow{display:flex;align-items:center;color:var(--theme-text-muted)}
.melody-flag-menu-arrow svg{width:18px;height:18px}
body.melody-flag-menu-open{overflow:hidden}
@media(min-width:601px){.melody-flag-menu-panel{top:90px;right:30px;width:360px;max-height:calc(100dvh - 110px);padding:16px}.melody-flag-menu-item{min-height:56px;font-size:15px}}
