/* ==========================================================
   トップページ (index.html) 用モダンテーマ
   ========================================================== */
:root {
    --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: 0 1px 2px rgba(16, 24, 40, 0.04), 0 4px 16px rgba(16, 24, 40, 0.06);
    --shadow-hover: 0 4px 8px rgba(16, 24, 40, 0.06), 0 16px 40px rgba(16, 24, 40, 0.12);
    --radius: 16px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --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: 0 1px 2px rgba(0, 0, 0, 0.3), 0 4px 16px rgba(0, 0, 0, 0.25);
        --shadow-hover: 0 4px 8px rgba(0, 0, 0, 0.3), 0 16px 40px rgba(0, 0, 0, 0.45);
    }
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: "Inter", "Noto Sans JP", system-ui, sans-serif;
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* ---------- ヒーロー ---------- */
.mh-hero {
    position: relative;
    padding: 7rem 0 6rem;
    background-size: cover;
    background-position: center;
    color: #fff;
    overflow: hidden;
}
.mh-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(1200px 400px at 10% 0%, rgba(79, 70, 229, 0.55), transparent 60%),
        linear-gradient(180deg, rgba(10, 12, 20, 0.55), rgba(10, 12, 20, 0.85));
}
.mh-hero .container { position: relative; }
.mh-hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 1rem;
}
.mh-hero p {
    font-size: clamp(1rem, 1.6vw, 1.2rem);
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}
.mh-hero .mh-eyebrow {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    padding: 0.3rem 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 999px;
    margin-bottom: 1.25rem;
    backdrop-filter: blur(6px);
}

/* ---------- メインレイアウト ---------- */
.mh-main { padding: 3rem 0 4rem; }

.mh-section-title {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.mh-sticky { position: sticky; top: 5.5rem; }

/* ---------- 記事カード ---------- */
.mh-card {
    position: relative;
    display: flex;
    gap: 1.25rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s;
}
.mh-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
    border-color: var(--accent-soft);
}
.mh-card-thumb {
    flex: 0 0 220px;
    aspect-ratio: 16 / 10;
    border-radius: 12px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--accent-soft), transparent);
}
.mh-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}
.mh-card:hover .mh-card-thumb img { transform: scale(1.05); }

.mh-card-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mh-card-title {
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.45;
    letter-spacing: -0.01em;
    margin: 0.35rem 0 0.25rem;
}
.mh-card-title a::after {      /* カード全体をクリック可能にする */
    content: "";
    position: absolute;
    inset: 0;
}
.mh-card:hover .mh-card-title { color: var(--accent); }
.mh-card-sub {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}
.mh-card-text {
    font-size: 0.9rem;
    color: var(--text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0.75rem;
}
.mh-card-meta {
    margin-top: auto;
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.mh-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.mh-tag {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    color: var(--accent);
    background: var(--accent-soft);
}

.mh-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
    background: var(--surface);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
}

@media (max-width: 767.98px) {
    .mh-card { flex-direction: column; }
    .mh-card-thumb { flex-basis: auto; width: 100%; }
}

/* ---------- ページネーション ---------- */
.mh-pagination {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    list-style: none;
    padding: 0;
    margin: 2rem 0 0;
}
.mh-pagination a {
    display: grid;
    place-items: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.75rem;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    font-weight: 600;
    font-size: 0.9rem;
    transition: all .2s;
}
.mh-pagination a:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

/* ---------- サイドパネル (バナー / ランキング) ---------- */
.mh-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow);
    margin-bottom: 1.25rem;
    overflow-wrap: anywhere;
}
.mh-panel .mh-section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text);
}
.mh-panel .mh-section-title svg { color: var(--accent); }

.mh-rank { list-style: none; padding: 0; margin: 0; }
.mh-rank li { border-top: 1px solid var(--border); }
.mh-rank li:first-child { border-top: 0; }
.mh-rank a {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.7rem 0;
    font-size: 0.9rem;
    line-height: 1.5;
}
.mh-rank a:hover .mh-rank-title { color: var(--accent); }
.mh-rank-no {
    flex: 0 0 1.75rem;
    height: 1.75rem;
    display: grid;
    place-items: center;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 800;
    background: var(--bg);
    color: var(--text-muted);
}
.mh-rank li:nth-child(-n+3) .mh-rank-no {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #fff;
}

/* ---------- フッター ---------- */
.mh-footer {
    border-top: 1px solid var(--border);
    padding: 2.5rem 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}
.mh-social { display: flex; justify-content: center; gap: 0.75rem; margin-bottom: 1rem; }
.mh-social a {
    display: grid;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-muted);
    transition: all .2s;
}
.mh-social a:hover { color: #fff; background: var(--accent); border-color: var(--accent); }

/* ---------- 日付の絞り込み ---------- */
.mh-filter {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.mh-filter label { display: flex; flex-direction: column; gap: 0.2rem; }
.mh-filter label span {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.mh-filter input[type="date"] {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.4rem 0.6rem;
    background: var(--bg);
    color: var(--text);
    color-scheme: light dark;
}
.mh-filter input[type="date"]:focus {
    outline: 0;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-soft);
}
.mh-filter-sep { padding-bottom: 0.45rem; color: var(--text-muted); }
.mh-btn {
    border: 1px solid var(--accent);
    border-radius: 999px;
    padding: 0.42rem 1.1rem;
    background: var(--accent);
    color: #fff;
    font-weight: 600;
    font-size: 0.875rem;
}
.mh-btn:hover { filter: brightness(1.1); color: #fff; }
.mh-btn-ghost { background: transparent; color: var(--text-muted); border-color: var(--border); }
.mh-btn-ghost:hover { color: var(--text); }

/* ---------- ページネーション (現在ページ / 無効) ---------- */
.mh-pagination span {
    display: grid;
    place-items: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.75rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.9rem;
}
.mh-pagination .is-current { background: var(--accent); color: #fff; }
.mh-pagination .is-disabled { color: var(--text-muted); opacity: 0.4; border: 1px solid var(--border); }

/* ---------- 広告 ---------- */
.mh-pr-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
}
.mh-banner { padding: 0.75rem; text-align: center; }
.mh-banner img { max-width: 100%; height: auto; border-radius: 8px; }
.mh-banner img[width="1"] { display: none; }

/* ---------- エラーページ (404 / 500) ---------- */
.mh-error {
    min-height: calc(100vh - 12rem);
    display: flex;
    align-items: center;
    padding: 4rem 0;
    text-align: center;
}
.mh-error-code {
    font-size: clamp(6rem, 22vw, 11rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.06em;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 1rem;
}
.mh-error h1 {
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}
.mh-error-lead { color: var(--text-muted); margin-bottom: 2rem; }
.mh-error-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 3rem;
}
.mh-error-actions .mh-btn { padding: 0.6rem 1.4rem; font-size: 0.95rem; }
.mh-error-latest {
    max-width: 34rem;
    margin: 0 auto;
    text-align: left;
}
.mh-error-latest ul {
    list-style: none;
    padding: 0;
    margin: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.mh-error-latest li + li { border-top: 1px solid var(--border); }
.mh-error-latest a {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    padding: 0.85rem 1.1rem;
    transition: background .2s;
}
.mh-error-latest a:hover { background: var(--accent-soft); }
.mh-error-latest a:hover .mh-error-latest-title { color: var(--accent); }
.mh-error-latest-title { font-weight: 600; min-width: 0; }
.mh-error-latest-date { flex: none; font-size: 0.8rem; color: var(--text-muted); }
