/* ==========================================================
   共通ナビゲーション (トップページ・記事ページ)
   色はナビの中だけで定義し、ページ本文のスタイルに影響させない
   ========================================================== */
.mh-nav,
.mh-suggest {
    --bg: #f6f7fb;
    --surface: #ffffff;
    --surface-glass: rgba(255, 255, 255, 0.72);
    --text: #1a1d29;
    --text-muted: #6b7183;
    --border: rgba(20, 24, 40, 0.08);
    --accent: #4f46e5;
    --accent-2: #06b6d4;
    --accent-soft: rgba(79, 70, 229, 0.10);
    --shadow-hover: 0 4px 8px rgba(16, 24, 40, 0.06), 0 16px 40px rgba(16, 24, 40, 0.12);
    font-family: "Inter", "Noto Sans JP", system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
    .mh-nav,
    .mh-suggest {
        --bg: #0e1017;
        --surface: #171a24;
        --surface-glass: rgba(23, 26, 36, 0.72);
        --text: #e8eaf2;
        --text-muted: #9097ab;
        --border: rgba(255, 255, 255, 0.08);
        --accent: #818cf8;
        --accent-2: #22d3ee;
        --accent-soft: rgba(129, 140, 248, 0.14);
        --shadow-hover: 0 4px 8px rgba(0, 0, 0, 0.3), 0 16px 40px rgba(0, 0, 0, 0.45);
    }
}

/* ---------- ナビゲーション ---------- */
.mh-nav {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: var(--surface-glass);
    backdrop-filter: saturate(180%) blur(16px);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
    border-bottom: 1px solid var(--border);
}
.mh-nav .navbar-brand {
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text);
}
.mh-nav .navbar-brand span {
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.mh-nav .nav-link {
    color: var(--text-muted);
    font-weight: 500;
}
.mh-nav .nav-link:hover { color: var(--text); }
.mh-nav .navbar-toggler {
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 0.9rem;
}

.mh-search {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.25rem 0.25rem 0.25rem 1rem;
    transition: border-color .2s, box-shadow .2s;
}
.mh-search:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-soft);
}
.mh-search input {
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
    min-width: 0;
    width: 14rem;
}
.mh-search button {
    border: 0;
    border-radius: 999px;
    padding: 0.35rem 1rem;
    background: var(--accent);
    color: #fff;
    font-weight: 600;
    font-size: 0.875rem;
}
.mh-search button:hover { filter: brightness(1.1); }


/* ---------- 検索候補 (コンボボックス) ---------- */
.mh-search-wrap { position: relative; }
.mh-suggest {
    position: absolute;
    top: calc(100% + 0.4rem);
    left: 0;
    right: 0;
    min-width: 20rem;
    max-height: 26rem;
    overflow-y: auto;
    list-style: none;
    margin: 0;
    padding: 0.35rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow-hover);
    z-index: 1040;
}
.mh-suggest li[role="option"] {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.75rem;
    padding: 0.55rem 0.75rem;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.875rem;
}
.mh-suggest li[role="option"]:hover,
.mh-suggest li.is-active { background: var(--accent-soft); }
.mh-suggest-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mh-suggest-title mark { background: none; color: var(--accent); font-weight: 700; padding: 0; }
.mh-suggest-date { flex: none; font-size: 0.75rem; color: var(--text-muted); }
.mh-suggest-status {
    flex: none;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    color: #b45309;
    background: rgba(245, 158, 11, 0.15);
}
.mh-suggest-empty { padding: 0.75rem; font-size: 0.85rem; color: var(--text-muted); }
@media (max-width: 991.98px) {
    .mh-suggest { min-width: 0; }
    .mh-search input { width: 100%; }
}
