/* ════════════════════════════════════════════════════════════════════════
   MC Mod Wiki — front-end styles
   Layout: TOC sidebar (sticky, left) + main content (right)
   Match 9minecraft.net house style: clean, readable, code blocks dark theme
   ════════════════════════════════════════════════════════════════════════ */

.mcw-wiki-page {
    background: #f8f9fa;
    padding: 24px 0 60px;
    min-height: 60vh;
    overflow-x: hidden;          /* clip horizontal trên toàn page wrapper */
}
.mcw-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 24px;
    box-sizing: border-box;
    width: 100%;
}
.mcw-content { box-sizing: border-box; min-width: 0; }
.mcw-layout, .mcw-content { max-width: 100%; }

/* ── Page header (breadcrumb + title) ───────────────────────────────────── */

.mcw-page-header {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 18px 24px;
    margin-bottom: 20px;
}
.mcw-breadcrumb {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 8px;
}
.mcw-breadcrumb a {
    color: #2563eb;
    text-decoration: none;
}
.mcw-breadcrumb a:hover { text-decoration: underline; }
.mcw-breadcrumb .mcw-sep { margin: 0 6px; color: #d1d5db; }
.mcw-breadcrumb .mcw-current { color: #111827; font-weight: 600; }

.mcw-page-title {
    margin: 0 0 6px;
    font-size: 28px;
    line-height: 1.25;
    color: #111827;
}
.mcw-page-description {
    margin: 0 0 12px;
    color: #4b5563;
    font-size: 15px;
}
.mcw-page-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    font-size: 13px;
    color: #6b7280;
}
.mcw-page-meta strong { color: #111827; }
.mcw-page-meta a { color: #2563eb; text-decoration: none; }

/* ── Layout grid ────────────────────────────────────────────────────────── */

.mcw-layout {
    display: grid;
    grid-template-columns: 260px 1fr;   /* TOC slim hơn → content thêm 20px breathing */
    gap: 32px;                          /* gap rộng hơn để tách TOC khỏi content rõ */
    align-items: start;
}

/* ── TOC sidebar (sticky) ───────────────────────────────────────────────── */

.mcw-toc-sidebar {
    position: sticky;
    top: 80px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
}
.mcw-toc-inner {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
}
.mcw-toc-mobile-toggle { display: none; }
.mcw-toc-heading {
    margin: 0 0 12px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6b7280;
}
.mcw-toc-list, .mcw-toc-sub {
    list-style: none;
    margin: 0;
    padding: 0;
}
.mcw-toc-sub {
    margin-left: 14px;
    border-left: 1px solid #e5e7eb;
    padding-left: 8px;
    margin-top: 2px;
    margin-bottom: 4px;
}
.mcw-toc-item a {
    display: block;
    padding: 4px 8px;
    color: #374151;
    text-decoration: none;
    font-size: 13px;
    line-height: 1.4;
    border-radius: 4px;
    border-left: 2px solid transparent;
    transition: all 0.15s;
}
.mcw-toc-item a:hover {
    background: #f3f4f6;
    color: #111827;
}
.mcw-toc-item a.mcw-active {
    color: #2563eb;
    background: #eff6ff;
    border-left-color: #2563eb;
    font-weight: 600;
}
.mcw-toc-l1 > a { font-weight: 600; color: #111827; }
.mcw-toc-l2 > a { font-size: 12.5px; }
.mcw-toc-l3 > a { font-size: 12px; color: #6b7280; }

/* ── Search box ─────────────────────────────────────────────────────────── */

.mcw-search-box {
    position: relative;
    margin-bottom: 14px;
}
.mcw-search-box input[type=search] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 13px;
    box-sizing: border-box;
}
.mcw-search-box input[type=search]:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
}
.mcw-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    max-height: 400px;
    overflow-y: auto;
    z-index: 50;
    display: none;
    margin-top: 4px;
}
.mcw-search-results.mcw-active { display: block; }
.mcw-search-result {
    display: block;
    padding: 10px 12px;
    border-bottom: 1px solid #f3f4f6;
    color: #111827;
    text-decoration: none;
    font-size: 13px;
}
.mcw-search-result:hover { background: #f9fafb; }
.mcw-search-result-title { font-weight: 600; color: #2563eb; margin-bottom: 3px; }
.mcw-search-result-snippet { color: #6b7280; font-size: 12px; line-height: 1.4; }
.mcw-search-result-snippet mark { background: #fef08a; padding: 0 2px; }
.mcw-search-empty { padding: 14px; color: #9ca3af; text-align: center; font-size: 13px; }

/* ── Main content ───────────────────────────────────────────────────────── */

.mcw-content {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 0;
    min-width: 0;  /* prevent grid overflow */
}
.mcw-content-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    border-radius: 8px 8px 0 0;
    flex-wrap: wrap;
    gap: 10px;
}
.mcw-content-toolbar-bottom {
    border-bottom: none;
    border-top: 1px solid #e5e7eb;
    border-radius: 0 0 8px 8px;
}
.mcw-toolbar-actions { display: flex; gap: 8px; }
.mcw-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    color: #374151;
    text-decoration: none;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s;
}
.mcw-btn:hover { background: #f3f4f6; border-color: #9ca3af; }
.mcw-btn-back { color: #2563eb; border-color: #bfdbfe; }
.mcw-btn-back:hover { background: #eff6ff; }

/* ── Article (wiki content) ─────────────────────────────────────────────── */

.mcw-article {
    padding: 36px 40px;
    color: #1f2937;
    line-height: 1.7;
    font-size: 15px;
    max-width: 100%;
    box-sizing: border-box;
    overflow-wrap: break-word;
    word-wrap: break-word;
}
.mcw-article p, .mcw-article li {
    overflow-wrap: anywhere;     /* break long words/URLs */
}
.mcw-article img,
.mcw-article video,
.mcw-article iframe {
    max-width: 100%;
    height: auto;
}
/* Table — wrap horizontal scroll cho table rộng (block + scroll) */
.mcw-article table {
    display: block;
    overflow-x: auto;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
}
.mcw-article h2,
.mcw-article h3,
.mcw-article h4 {
    color: #111827;
    line-height: 1.3;
    scroll-margin-top: 80px;
    margin: 36px 0 18px;
}
/* H2 — match style "Features:" / "Screenshots:" của theme: vạch xanh trái + underline dưới */
.mcw-article h2 {
    font-size: 22px;
    font-weight: 800;
    padding: 2px 0 10px 14px;
    border-left: 4px solid #16a34a;
    border-bottom: 1px solid #d1fae5;
}
/* H3 — sub-section: lighter, vạch nhỏ hơn */
.mcw-article h3 {
    font-size: 18px;
    font-weight: 700;
    padding: 2px 0 6px 12px;
    border-left: 3px solid #93c5fd;
    color: #1e3a8a;
    margin-top: 28px;
}
/* H4 — fine-grained: chỉ bold, no stripe (đỡ rối ở level sâu) */
.mcw-article h4 {
    font-size: 15.5px;
    font-weight: 700;
    color: #374151;
    margin-top: 22px;
}
.mcw-article p { margin: 10px 0; }
.mcw-article ul, .mcw-article ol { margin: 10px 0; padding-left: 24px; }
.mcw-article li { margin: 4px 0; }
.mcw-article a { color: #2563eb; }
.mcw-article a:hover { text-decoration: underline; }
.mcw-article blockquote {
    margin: 14px 0;
    padding: 10px 16px;
    border-left: 4px solid #2563eb;
    background: #eff6ff;
    color: #1e3a8a;
    border-radius: 0 4px 4px 0;
}
.mcw-article hr {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 24px 0;
}

/* Anchor link (# icon) — visible on hover, vị trí bên phải để không phá vạch xanh */
.mcw-anchor-link {
    color: #cbd5e1;
    text-decoration: none;
    margin-left: 8px;
    font-weight: 400;
    font-size: 0.85em;
    opacity: 0;
    transition: opacity 0.15s, color 0.15s;
}
.mcw-article h2:hover .mcw-anchor-link,
.mcw-article h3:hover .mcw-anchor-link,
.mcw-article h4:hover .mcw-anchor-link {
    opacity: 1;
}
.mcw-anchor-link:hover { color: #16a34a; }

/* ── Code blocks ────────────────────────────────────────────────────────── */

.mcw-article code {
    background: #f3f4f6;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Cascadia Code', 'Fira Code', Consolas, Monaco, monospace;
    font-size: 13px;
    color: #b91c1c;
    word-break: break-word;          /* inline code có thể break ở mobile */
}
.mcw-article pre {
    position: relative;
    background: #1e293b;
    color: #e2e8f0;
    padding: 14px 16px;
    border-radius: 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 14px 0;
    font-size: 13px;
    line-height: 1.5;
    max-width: 100%;
    box-sizing: border-box;
}
.mcw-article pre code {
    background: transparent;
    color: inherit;
    padding: 0;
    font-size: inherit;
    word-break: normal;              /* code block giữ nguyên line, chỉ scroll ngang */
    white-space: pre;
}
.mcw-copy-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255,255,255,0.1);
    color: #e2e8f0;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 4px;
    padding: 3px 8px;
    font-size: 11px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s;
}
.mcw-article pre:hover .mcw-copy-btn { opacity: 1; }
.mcw-copy-btn:hover { background: rgba(255,255,255,0.2); }
.mcw-copy-btn.mcw-copied { background: #16a34a; border-color: #16a34a; opacity: 1; }

/* ── Tables ─────────────────────────────────────────────────────────────── */

.mcw-article table {
    border-collapse: collapse;
    margin: 14px 0;
    width: 100%;
    font-size: 13px;
}
.mcw-article th,
.mcw-article td {
    padding: 8px 12px;
    text-align: left;
    border: 1px solid #e5e7eb;
}
.mcw-article th {
    background: #f9fafb;
    font-weight: 600;
    color: #374151;
}
.mcw-article tr:nth-child(even) td { background: #fafbfc; }

/* ════════════════════════════════════════════════════════════════════════
   Wiki callout & heading — design tokens scoped to .mcw-wiki-section.
   CSS variables giúp đổi màu dễ dàng (vd dark mode override).
   Plugin CSS enqueued với priority 999 → load SAU theme → win source order.
   ZERO !important.
   ════════════════════════════════════════════════════════════════════════ */

/* OVERRIDE theme's `.postContent div { margin: 5px 0 }` (specificity 0,1,1).
   Plugin needs .postContent prefix → 0,2,0 wins. Bare selector kept cho page
   templates không có .postContent wrapper. */
.postContent .mcw-wiki-section,
.mcw-wiki-section {
    /* Design tokens (blue palette) */
    --primary:    #2563eb;
    --primary-2:  #60a5fa;
    --primary-d:  #1d4ed8;
    --bg-soft:    #eff6ff;
    --border:     #bfdbfe;
    --text:       #1a1a1a;
    --text-mute:  #6b7280;

    margin: 32px 0;
    padding-top: 24px;
}

/* Heading — match style "How to Install:" / "Requirements:" pattern.
   Theme có `.postContent h3 { margin: 1.8em 0 0.7em }` cùng specificity (0,2,0)
   → plugin wins via source order. h3 margin-bottom 18px khớp Install/Requirements. */
.postContent .mcw-wiki-section h3,
.mcw-wiki-section h3 {
    position: relative;
    display: inline-block;
    margin: 0 0 18px 0;
    padding: 0 0 8px 0;
    font-size: 22px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.3px;
    text-decoration: none;
    border-bottom: 0;
    background: none;
}
.mcw-wiki-section h3::before {
    content: "";
    display: inline-block;
    position: static;
    width: 28px;
    height: 28px;
    margin-right: 10px;
    vertical-align: -8px;
    background: url('icons/wiki.png') no-repeat center / contain;
    border-radius: 0;
}
.mcw-wiki-section h3::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-2) 100%);
    border-radius: 2px;
}

/* Callout box (pastel banner pattern, blue theme).
   margin:0 — gap to h3 comes from h3's margin-bottom only (match .mcig-card pattern).
   Outer .mcw-wiki-section provides spacing to surrounding content. */
.mcw-callout {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px 18px;
    margin: 0;
    flex-wrap: wrap;
}
.mcw-callout-body {
    flex: 1;
    min-width: 0;
}
.mcw-callout-text {
    margin: 0;
    color: #1f2937;
    font-size: 14.5px;
    line-height: 1.55;
}
.mcw-callout-text strong {
    color: #111827;
    font-weight: 700;
}
.mcw-callout-meta-inline {
    color: var(--text-mute);
    font-size: 12.5px;
    margin-left: 4px;
}
.mcw-callout-cta { flex-shrink: 0; }
/* Selector "a.mcw-callout-btn" (0,1,1) equal với theme .pd__content a → plugin wins source order */
a.mcw-callout-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--primary);
    color: #fff;
    padding: 9px 18px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: background 0.15s, box-shadow 0.15s;
    white-space: nowrap;
}
a.mcw-callout-btn:hover,
a.mcw-callout-btn:focus {
    background: var(--primary-d);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
    color: #fff;
    text-decoration: none;
}
.mcw-callout-arrow { transition: transform 0.15s; }
a.mcw-callout-btn:hover .mcw-callout-arrow { transform: translateX(2px); }

/* Page-meta separator dot (used in wiki page header) */
.mcw-meta-dot {
    color: #d1d5db;
    font-weight: 700;
}

/* ── Mobile responsive ──────────────────────────────────────────────────── */

@media (max-width: 900px) {
    .mcw-container { padding: 0 14px; }
    .mcw-layout {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    .mcw-toc-sidebar {
        position: static;
        max-height: none;
    }
    .mcw-toc-mobile-toggle {
        display: block;
        width: 100%;
        background: #2563eb;
        color: #fff;
        border: none;
        padding: 12px;
        border-radius: 6px;
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
        margin-bottom: 8px;
    }
    .mcw-toc-content { display: none; }
    .mcw-toc-sidebar.mcw-toc-open .mcw-toc-content { display: block; }
    .mcw-article { padding: 20px 14px; }
    .mcw-page-header { padding: 14px 16px; }
    .mcw-page-title { font-size: 22px; }
    .mcw-content-toolbar { padding: 10px 14px; }
    .mcw-callout {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 14px;
    }
    .mcw-callout-cta { width: 100%; }
    .mcw-callout-btn { width: 100%; justify-content: center; }
    .mcw-callout-text { font-size: 14px; }
}

@media (max-width: 600px) {
    .mcw-container { padding: 0 10px; }
    .mcw-article { padding: 16px 12px; font-size: 14.5px; }
    .mcw-article h2 { font-size: 19px; padding-left: 10px; }
    .mcw-article h3 { font-size: 16.5px; padding-left: 10px; }
    .mcw-article h4 { font-size: 15px; }
    .mcw-article pre {
        padding: 10px 12px;
        font-size: 12px;
        margin: 12px -2px;            /* tận dụng full content width trên phone */
        border-radius: 4px;
    }
    .mcw-article code { font-size: 12.5px; }
    .mcw-article ul, .mcw-article ol { padding-left: 20px; }
    .mcw-copy-btn { font-size: 10px; padding: 2px 6px; }
    .mcw-page-meta { gap: 8px; font-size: 12px; }
    .mcw-breadcrumb { font-size: 12px; }
    .mcw-content-toolbar { flex-direction: column; align-items: stretch; }
    .mcw-toolbar-actions { justify-content: flex-end; }
}

/* ── Print styles (PDF export) ──────────────────────────────────────────── */

@media print {
    .mcw-toc-sidebar,
    .mcw-content-toolbar,
    .mcw-page-meta,
    .mcw-breadcrumb,
    .mcw-search-box,
    .mcw-copy-btn,
    .mcw-toc-mobile-toggle,
    header, footer, nav,
    .site-header, .site-footer { display: none !important; }
    .mcw-wiki-page { background: #fff; padding: 0; }
    .mcw-container { max-width: none; padding: 0; }
    .mcw-layout { display: block; }
    .mcw-content, .mcw-page-header {
        border: none; box-shadow: none; border-radius: 0;
    }
    .mcw-article { padding: 0; font-size: 11pt; }
    .mcw-article h2 { page-break-after: avoid; }
    .mcw-article pre { page-break-inside: avoid; }
}

/* ════════════════════════════════════════════════════════════════════════
   Multi-page wiki (v1.7+): index page (cards grid) + chapter page (nav + pager)
   ════════════════════════════════════════════════════════════════════════ */

/* ── Index page: tree-style chapter list ────────────────────────────────── */

.mcw-wiki-index .mcw-page-header { margin-bottom: 20px; }

.mcw-search-inline {
    position: relative;
    min-width: 280px;
}
.mcw-search-inline input[type="search"] {
    width: 100%;
    padding: 7px 12px;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    font-size: 13px;
    box-sizing: border-box;
    background: #fff;
}
.mcw-search-inline input[type="search"]:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}

.mcw-index-article { padding: 28px 32px; }
.mcw-index-article > .mcw-section-title {
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e5e7eb;
    font-size: 18px;
}

.mcw-chapter-tree {
    margin: 0;
    padding: 0 0 0 28px;
    list-style: decimal;
    counter-reset: chapter;
}
.mcw-chapter-tree-item {
    margin: 0 0 8px;
    padding: 0;
    line-height: 1.5;
}
.mcw-chapter-tree-item::marker {
    color: #6b7280;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    font-size: 13px;
}
.mcw-chapter-tree-link {
    display: inline-block;
    padding: 2px 6px;
    margin-left: 4px;
    color: #1d4ed8;
    font-weight: 500;
    text-decoration: none;
    font-size: 15px;
    border-radius: 3px;
    transition: background .12s, color .12s;
}
.mcw-chapter-tree-link:hover {
    background: #eff6ff;
    color: #1e3a8a;
    text-decoration: underline;
}

.mcw-chapter-tree-sub {
    margin: 4px 0 6px;
    padding-left: 22px;
    list-style: disc;
}
.mcw-chapter-tree-sub-item {
    margin: 2px 0;
    line-height: 1.4;
    color: #6b7280;
    font-size: 13px;
}
.mcw-chapter-tree-sub-item a {
    color: #4b5563;
    text-decoration: none;
    padding: 1px 4px;
    border-radius: 3px;
}
.mcw-chapter-tree-sub-item a:hover {
    color: #1d4ed8;
    background: #f3f4f6;
    text-decoration: underline;
}
.mcw-chapter-tree-l3 {
    list-style: circle;
    margin-left: 18px;
    font-size: 12px;
}

/* Two-column on wide screens — keep tree readable but use horizontal space */
@media (min-width: 1024px) {
    .mcw-chapter-tree {
        column-count: 2;
        column-gap: 40px;
        column-rule: 1px solid #f1f5f9;
    }
    .mcw-chapter-tree-item {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}

/* ── Chapter page: sidebar chapter list ─────────────────────────────────── */

.mcw-chapter-nav { margin: 0 0 18px; padding: 0; list-style: none; }
.mcw-chapter-nav .mcw-toc-item { margin: 0; }
.mcw-chapter-nav .mcw-toc-item > a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 4px;
    color: #374151;
    text-decoration: none;
    font-size: 13px;
    line-height: 1.4;
}
.mcw-chapter-nav .mcw-toc-item > a:hover {
    background: #f3f4f6;
    color: #2563eb;
}
.mcw-chapter-nav .mcw-toc-current > a {
    background: #eff6ff;
    color: #1d4ed8;
    font-weight: 600;
    border-left: 3px solid #2563eb;
    padding-left: 7px;
}
.mcw-chapter-nav-num {
    flex-shrink: 0;
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 11px;
    color: #9ca3af;
    font-weight: 600;
}
.mcw-chapter-nav .mcw-toc-current .mcw-chapter-nav-num { color: #2563eb; }
.mcw-chapter-nav-title { flex: 1; min-width: 0; }

.mcw-toc-heading-sub {
    margin-top: 18px !important;
    padding-top: 14px;
    border-top: 1px solid #e5e7eb;
    font-size: 11px !important;
}
.mcw-toc-sub-list { font-size: 12px; }
.mcw-toc-sub-list .mcw-toc-l2 { padding-left: 8px; }
.mcw-toc-sub-list .mcw-toc-l3 { padding-left: 20px; font-size: 11px; }

/* ── Chapter page: prev/next pager at bottom ───────────────────────────── */

.mcw-chapter-pager {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 10px;
    margin: 32px 0 0;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
}
.mcw-pager-item {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 12px 16px;
    text-decoration: none;
    color: inherit;
    transition: border-color .15s, background .15s;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-height: 56px;
    justify-content: center;
}
.mcw-pager-item:hover {
    border-color: #2563eb;
    background: #f8fafc;
    text-decoration: none;
}
.mcw-pager-empty { background: transparent; border: none; cursor: default; }
.mcw-pager-empty:hover { background: transparent; border: none; }
.mcw-pager-prev { text-align: left; }
.mcw-pager-next { text-align: right; }
.mcw-pager-index {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-width: 110px;
}
.mcw-pager-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #6b7280;
    font-weight: 600;
}
.mcw-pager-title {
    font-size: 14px;
    color: #111827;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.mcw-pager-icon { font-size: 18px; color: #2563eb; }

/* ── Responsive: stack pager on mobile, single column cards ─────────────── */
@media (max-width: 720px) {
    .mcw-chapter-grid { grid-template-columns: 1fr; }
    .mcw-chapter-pager { grid-template-columns: 1fr; }
    .mcw-pager-item { text-align: left; }
    .mcw-pager-next { text-align: left; }
}

/* ── Print: hide pager + nav on chapter pages ──────────────────────────── */
@media print {
    .mcw-chapter-pager, .mcw-chapter-nav, .mcw-toc-heading-sub, .mcw-toc-sub-list { display: none; }
    .mcw-chapter-grid { grid-template-columns: 1fr; }
}
