/* ==========================================================================
   Comic - 共通スタイル
   ========================================================================== */

/* パンくずリスト */
.comic-breadcrumb {
    font-size: 0.78rem;
    color: #9ca3af;
    margin-bottom: 12px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.comic-breadcrumb a {
    color: #6b7280;
    text-decoration: none;
}
.comic-breadcrumb a:hover {
    color: #2563eb;
    text-decoration: underline;
}
.comic-breadcrumb-sep {
    margin: 0 4px;
    color: #d1d5db;
}

/* 2カラムレイアウト */
.comic-wrapper {
    width: 100%;
    max-width: 100%;
    /* padding: 16px; */
    position: relative;
    box-sizing: border-box;
}
.comic-layout {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    min-width: 0;
    max-width: 100%;
    /* 1200px超ではsidebar(220)+gap(24)+main(最大1080)= 1324px で中央寄せ */
    margin: 0 auto;
}
@media (min-width: 1200px) {
    .comic-layout {
        max-width: 1324px;
    }
}
.comic-sidebar {
    width: 220px;
    flex-shrink: 0;
    position: sticky;
    top: calc(52px + 12px);
}
.comic-main {
    flex: 1;
    min-width: 0;
    max-width: 100%;
}
@media (min-width: 1200px) {
    .comic-wrapper .comic-layout .comic-main {
        max-width: min(100%, 1080px);
    }
}

/* サイドバーナビ */
.comic-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.comic-sidebar-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    color: #475569;
    transition: background 0.15s, color 0.15s;
}
.comic-sidebar-link:hover {
    background: #f1f5f9;
    color: #1e293b;
}
.comic-sidebar-link.active {
    background: #eff6ff;
    color: #2563eb;
    font-weight: 600;
}
.comic-sidebar-divider {
    height: 1px;
    background: #e2e8f0;
    margin: 8px 0;
}
.comic-sidebar-heading {
    font-size: 0.75rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 4px 12px 2px;
}

/* レスポンシブ: サイドバー→横スクロールナビ */
@media (max-width: 768px) {
    .comic-layout {
        flex-direction: column;
    }
    .comic-sidebar {
        width: 100%;
        position: sticky;
        top: 52px;
        z-index: 998;
        background: #fff;
    }
    .comic-sidebar-nav {
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 6px;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding: 8px 10px;
        border-bottom: 1px solid #e2e8f0;
    }
    .comic-sidebar-nav::-webkit-scrollbar {
        display: none;
    }
    .comic-sidebar-link {
        padding: 6px 12px;
        font-size: 0.82rem;
        white-space: nowrap;
        flex-shrink: 0;
    }
    .comic-sidebar-divider,
    .comic-sidebar-heading {
        display: none;
    }
}

/* グリッドレイアウト */
.comic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
}

/* カードコンポーネント */
.comic-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow .2s;
}
.comic-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,.1);
}
.comic-card-img {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    background: #f3f4f6;
}
.comic-card-body {
    padding: 10px;
}
.comic-card-title {
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.comic-card-title a {
    color: #111827;
    text-decoration: none;
}
.comic-card-title a:hover {
    color: #2563eb;
}
.comic-card-meta {
    font-size: 0.75rem;
    color: #6b7280;
}
.comic-card-update {
    font-size: 0.75rem;
    color: #dc2626;
    font-weight: 600;
}

/* ページネーション */
.comic-pagination {
    margin-top: 20px;
    display: flex;
    justify-content: center;
}

/* 空状態 */
.comic-empty {
    text-align: center;
    padding: 60px 20px;
    color: #9ca3af;
}

/* セクション */
.comic-section {
    margin-bottom: 32px;
}
.comic-section h2 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #1f2937;
}

/* レスポンシブ */
@media (max-width: 640px) {
    .comic-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
}
