.lmg-gallery,
.lmg-latest,
.lmg-pagination {
    --lmg-accent: #a93618;
    --lmg-border: rgba(120, 70, 35, 0.18);
    --lmg-card-bg: rgba(255, 255, 255, 0.42);
    --lmg-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}


.lmg-gallery-wrap {
    max-width: 1120px;
    margin-left: auto;
    margin-right: auto;
}

.lmg-gallery {
    display: grid;
    grid-template-columns: repeat(var(--lmg-columns, 3), minmax(0, 1fr));
    gap: 28px 22px;
    align-items: start;
    margin: 24px auto;
}

.lmg-issue-card {
    text-align: center;
    margin: 0;
}

.lmg-cover-link {
    display: block;
    text-decoration: none;
}

.lmg-cover-frame {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 3 / 4.25;
    width: 100%;
    overflow: hidden;
    background: var(--lmg-card-bg);
    border: 1px solid var(--lmg-border);
    box-shadow: var(--lmg-shadow);
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.lmg-cover-link[href]:hover .lmg-cover-frame,
.lmg-cover-link[href]:focus .lmg-cover-frame {
    transform: translateY(-3px);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.18);
}

.lmg-cover-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.lmg-cover-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 24px;
    color: var(--lmg-accent);
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.2rem;
    line-height: 1.35;
    text-align: center;
}

.lmg-issue-title {
    margin: 12px 0 0;
    color: var(--lmg-accent);
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(1rem, 1.4vw, 1.15rem);
    font-weight: 700;
    line-height: 1.25;
}

.lmg-issue-title a {
    color: inherit;
    text-decoration: none;
}

.lmg-issue-title a:hover,
.lmg-issue-title a:focus {
    text-decoration: underline;
}

.lmg-issue-excerpt {
    margin-top: 8px;
    font-size: 0.95rem;
    line-height: 1.55;
}

.lmg-small-button,
.lmg-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--lmg-accent);
    color: #fff !important;
    text-decoration: none;
    font-weight: 700;
    line-height: 1.2;
    transition: transform 160ms ease, opacity 160ms ease;
}

.lmg-small-button:hover,
.lmg-small-button:focus,
.lmg-button:hover,
.lmg-button:focus {
    color: #fff !important;
    opacity: 0.92;
    transform: translateY(-1px);
    text-decoration: none;
}

.lmg-small-button {
    margin-top: 10px;
    padding: 9px 16px;
    font-size: 0.92rem;
}

.lmg-latest {
    margin: 28px auto 36px;
}

.lmg-section-heading {
    margin: 0 0 18px;
    text-align: center;
    color: var(--lmg-accent);
    font-family: Georgia, 'Times New Roman', serif;
}

.lmg-latest-card {
    display: grid;
    grid-template-columns: minmax(220px, 390px) minmax(0, 1fr);
    gap: 28px;
    align-items: center;
    max-width: 980px;
    margin: 0 auto;
    padding: 22px;
    background: rgba(255, 255, 255, 0.32);
    border: 1px solid var(--lmg-border);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.10);
}

.lmg-latest-cover-wrap {
    position: relative;
}

.lmg-latest-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    padding: 7px 11px;
    border-radius: 999px;
    background: var(--lmg-accent);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.lmg-latest-title {
    margin: 0 0 12px;
    color: var(--lmg-accent);
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    line-height: 1.1;
}

.lmg-latest-excerpt {
    margin: 0 0 18px;
    font-size: 1rem;
    line-height: 1.65;
}

.lmg-latest-excerpt p {
    margin-top: 0;
}

.lmg-button {
    padding: 12px 22px;
    font-size: 1rem;
}


.lmg-pagination {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 30px auto 8px;
    padding: 18px 0 4px;
    clear: both;
    text-align: center;
}

.lmg-page-status {
    color: rgba(80, 45, 28, 0.78);
    font-size: 0.94rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.lmg-page-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.lmg-page-link,
.lmg-page-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    min-height: 40px;
    padding: 8px 14px;
    border-radius: 999px;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1;
}

.lmg-page-link {
    border: 1px solid var(--lmg-border);
    background: rgba(255, 255, 255, 0.72);
    color: var(--lmg-accent) !important;
    text-decoration: none !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
    transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.lmg-page-link:hover,
.lmg-page-link:focus {
    background: #fff;
    color: var(--lmg-accent) !important;
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.12);
    text-decoration: none !important;
}

.lmg-page-current,
.lmg-page-current:hover,
.lmg-page-current:focus {
    background: var(--lmg-accent);
    border-color: var(--lmg-accent);
    color: #fff !important;
    box-shadow: 0 8px 18px rgba(169, 54, 24, 0.24);
    transform: none;
}

.lmg-page-prev,
.lmg-page-next {
    min-width: 104px;
}

.lmg-page-ellipsis {
    min-width: 28px;
    padding-left: 4px;
    padding-right: 4px;
    color: rgba(80, 45, 28, 0.62);
}

.lmg-empty {
    text-align: center;
}

@media (max-width: 900px) {
    .lmg-gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .lmg-latest-card {
        grid-template-columns: 1fr;
        max-width: 520px;
    }
}

@media (max-width: 600px) {

    .lmg-page-link,
    .lmg-page-ellipsis {
        min-width: 36px;
        min-height: 36px;
        padding: 7px 12px;
        font-size: 0.95rem;
    }

    .lmg-page-prev,
    .lmg-page-next {
        min-width: auto;
    }

    .lmg-gallery {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .lmg-latest-card {
        padding: 16px;
    }
}
