.mfci-wrap {
    --mfci-accent: #00AFF0;
    --mfci-accent-dim: rgba(0, 175, 240, 0.15);
    --mfci-bg: #111111;
    --mfci-card-bg: #1a1a1a;
    --mfci-pill-bg: rgba(255, 255, 255, 0.06);
    --mfci-pill-border: rgba(255, 255, 255, 0.1);
    --mfci-text: #ffffff;
    --mfci-text-muted: #9a9a9a;

    max-width: 1400px;
    margin: 0 auto;
    padding-top: 40px;
    padding-bottom: 70px;
    text-align: center;
}

.mfci-page-title { margin: 0 0 20px; text-align: center; color: var(--mfci-text); }

.mfci-visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.mfci-template-page { margin-top: 30px; margin-bottom: 40px; }

.mfci-sort-bar {
    margin: 0 auto 24px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
}
.mfci-sort-label {
    font-weight: 600;
    margin-right: 6px;
    color: var(--mfci-text-muted);
}
.mfci-sort-link {
    padding: 8px 18px;
    border-radius: 999px;
    background: var(--mfci-pill-bg);
    border: 1px solid var(--mfci-pill-border);
    text-decoration: none;
    color: var(--mfci-text);
    font-size: 14px;
    font-weight: 500;
    transition: background .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.mfci-sort-link:hover {
    background: var(--mfci-accent-dim);
    border-color: var(--mfci-accent);
    color: var(--mfci-accent);
}
.mfci-sort-link.active {
    background: var(--mfci-accent);
    border-color: var(--mfci-accent);
    color: #fff;
    box-shadow: 0 0 0 3px var(--mfci-accent-dim);
}

/* A-Z jump nav */
.mfci-aznav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 0 auto 34px;
    max-width: 760px;
}
.mfci-aznav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: var(--mfci-pill-bg);
    border: 1px solid var(--mfci-pill-border);
    color: var(--mfci-text);
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.mfci-aznav-link:hover {
    background: var(--mfci-accent);
    border-color: var(--mfci-accent);
    color: #fff;
}
.mfci-aznav-link.is-disabled {
    background: transparent;
    border-color: transparent;
    color: #444;
    cursor: default;
}

.mfci-letter-group {
    margin-bottom: 48px;
    text-align: center;
    scroll-margin-top: 24px;
}
.mfci-letter-heading {
    display: inline-block;
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 20px;
    padding-bottom: 8px;
    color: var(--mfci-text);
    border-bottom: 3px solid var(--mfci-accent);
}

.mfci-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
    list-style: none;
    margin: 0;
    padding: 0;
}
@media (max-width: 900px) {
    .mfci-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
    .mfci-grid { grid-template-columns: 1fr; }
}

.mfci-card-item {
    list-style: none;
    display: flex;
    justify-content: center;
}

.mfci-card {
    display: block;
    text-decoration: none;
    color: inherit;
    border-radius: 10px;
    overflow: hidden;
    background: var(--mfci-card-bg);
    border: 1px solid var(--mfci-pill-border);
    transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
    height: 100%;
    width: 100%;
    max-width: 362.5px;
    margin: 0 auto;
}
.mfci-card:hover {
    transform: translateY(-4px);
    border-color: var(--mfci-accent);
    box-shadow: 0 8px 24px var(--mfci-accent-dim);
}
.mfci-cover { width: 100%; aspect-ratio: 362.5 / 203.9; background: #2a2a2a; overflow: hidden; }
.mfci-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mfci-cover-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 46px;
    font-weight: 700;
    color: var(--mfci-accent);
}
.mfci-info { padding: 14px 16px; text-align: center; }
.mfci-name {
    font-weight: 600;
    font-size: 16px;
    color: var(--mfci-text);
    margin: 0 0 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mfci-meta {
    display: flex;
    justify-content: center;
    gap: 16px;
    font-size: 12px;
    color: var(--mfci-text-muted);
    margin-top: 6px;
}
.mfci-empty { text-align: center; color: var(--mfci-text-muted); }
.mfci-pagination {
    margin-top: 30px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}
.mfci-pagination a {
    padding: 8px 14px;
    background: var(--mfci-pill-bg);
    border: 1px solid var(--mfci-pill-border);
    border-radius: 8px;
    text-decoration: none;
    color: var(--mfci-text);
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.mfci-pagination a:hover {
    border-color: var(--mfci-accent);
    color: var(--mfci-accent);
}
.mfci-pagination a.active {
    background: var(--mfci-accent);
    border-color: var(--mfci-accent);
    color: #fff;
}

/* Category description + cover thumbnail, shown on the category's own archive page (not the index grid) */
.mfci-category-header {
    grid-column: 1 / -1 !important;
    flex: 0 0 100% !important;
    width: 100% !important;
    box-sizing: border-box;
    margin: 0 0 40px !important;
    padding-bottom: 30px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.mfci-category-description__inner {
    max-width: 760px;
    margin: 0 auto 20px;
    text-align: center;
    color: #9a9a9a;
    font-size: 15px;
    line-height: 1.7;
}
.mfci-category-description__inner a { color: #00AFF0; }
.mfci-category-description__inner a:hover { text-decoration: underline; }

.mfci-category-header__cover {
    max-width: 1184px;
    width: 100%;
    margin: 0 auto;
    aspect-ratio: 1184 / 666;
    border-radius: 10px;
    overflow: hidden;
    background: #2a2a2a;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.mfci-category-header__cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@media (max-width: 600px) {
    .mfci-wrap { padding-top: 24px; padding-bottom: 40px; }
    .mfci-category-header { margin-bottom: 24px !important; padding-bottom: 20px !important; }
}
