.ic-roman-smallcaps { font-variant: small-caps; }
.ic-catalogue-reference, .icnf-notice-fields .icnf-reference, .ic-index .ic-index-references {
    color: var(--wp--preset--color--accent-1, #8b1e1e) !important;
}
/* Keep the theme faces, with broad Latin Extended and Cyrillic fallbacks. */
:root, .editor-styles-wrapper {
    --wp--preset--font-family--operetta-18: "Operetta 18", "Noto Serif", Georgia, "Times New Roman", serif;
    --wp--preset--font-family--eaves-leage-livre: "Eaves Leage Livre", "Noto Serif", Georgia, "Times New Roman", serif;
}

/* Imported Han text must not inherit the site's italic or heavy Latin style. */
:is(.catalogue-chinese, [lang="zh"], .icnf-chinese-title, .icnf-authors-chinese, .icnf-associated-authors-chinese),
:is(.catalogue-chinese, [lang="zh"], .icnf-chinese-title, .icnf-authors-chinese, .icnf-associated-authors-chinese) :is(em, i, strong, b) {
    color: var(--wp--preset--color--accent-1, #8b1e1e) !important;
    font-family: "Noto Serif CJK TC", "Source Han Serif TC", "Songti TC", "Songti SC", "Noto Serif CJK SC", serif !important;
    font-style: normal !important;
    font-weight: 400 !important;
    font-synthesis: none;
}

/* Native List and List Item blocks on the editable section pages. */
.ic-catalogue-section-page .ic-catalogue-notices { list-style: none; padding-left: 0; }
.ic-catalogue-section-page .ic-catalogue-notices li {
    margin: 0;
    padding: .55em 0;
    border-bottom: 1px solid color-mix(in srgb, currentColor 15%, transparent);
}
.ic-catalogue-section-page .ic-catalogue-notices a {
    color: inherit;
    font-style: normal;
    text-decoration: none;
}
.ic-catalogue-section-page .ic-catalogue-notices a:hover,
.ic-catalogue-section-page .ic-catalogue-notices a:focus-visible { text-decoration: underline; }
.ic-footer-login .wp-block-button__link {
    font-family: inherit;
    text-decoration: none;
    transition: background-color .15s ease;
}
.ic-footer-login .wp-block-button__link:hover {
    background-color: color-mix(in srgb, currentColor 6%, transparent);
}
.ic-footer-login .wp-block-button__link:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
.logged-in :is(.ic-footer-login, .ic-footer-login-controls) { display: none; }

/* The native Featured Image block remains editable in the single template. */
.wp-block-post-featured-image.icnf-featured-lightbox {
    text-align: center;
    max-width: 100%;
}
.wp-block-post-featured-image.icnf-featured-lightbox img,
.editor-styles-wrapper .wp-block-post-featured-image img {
    display: inline-block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 320px;
    max-height: min(320px, 42svh);
    object-fit: contain;
}
@media (max-width: 600px) {
    .wp-block-post-featured-image.icnf-featured-lightbox img,
    .editor-styles-wrapper .wp-block-post-featured-image img {
        max-height: 230px;
        max-height: min(230px, 34svh);
    }
}

/* Keep the complete artwork visible when WordPress opens its native lightbox. */
.wp-lightbox-overlay .wp-block-image img { object-fit: contain !important; }

/* Keep narrow bindings and native uncropped galleries within the reading area. */
.icnf-secondary-gallery > figure.wp-block-image,
.ic-catalogue-visual-gallery > figure.wp-block-image {
    min-width: 0;
    align-self: start;
}
.icnf-secondary-gallery > figure.wp-block-image img,
.ic-catalogue-visual-gallery > figure.wp-block-image img {
    max-width: 100% !important;
    max-height: min(400px, 60svh) !important;
    height: auto !important;
    object-fit: contain !important;
}
.ic-catalogue-visual-gallery { clear: both; margin-block: var(--wp--preset--spacing--40, 2rem); }
/* Part 8: stable rows for mixed portrait/landscape images, using native Gallery blocks. */
.wp-block-gallery.ic-catalogue-visual-gallery {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
    gap: var(--wp--preset--spacing--40, 2rem);
}
.wp-block-gallery.ic-catalogue-visual-gallery > figure.wp-block-image {
    width: 100% !important;
    height: auto;
    margin: 0 !important;
    overflow: hidden;
}
.wp-block-gallery.ic-catalogue-visual-gallery > figure.wp-block-image img {
    flex: none;
    width: auto;
    margin-inline: auto;
}
@media (max-width: 600px) {
    .wp-block-gallery.ic-catalogue-visual-gallery { grid-template-columns: minmax(0, 1fr); }
}
.ic-editorial-introduction { margin-block: var(--wp--preset--spacing--50, 3rem); }
.ic-editorial-introduction p { font-style: normal; font-weight: inherit; }
.icnf-end-separator { margin-block: 2em 1em; text-align: center; font-style: normal; }

/* Public entrance: keep the copyright and sign-in within the first screen. */
.home:not(.logged-in) .wp-site-blocks {
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    padding-block: 0;
    box-sizing: border-box;
}
.home:not(.logged-in) .ic-public-front {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-block: 0;
}
.home:not(.logged-in) .ic-public-front > .wp-block-group {
    min-height: 0 !important;
    width: 100%;
    padding-block: clamp(1rem, 5svh, 3rem) !important;
}
.home:not(.logged-in) .ic-public-front img { max-height: 30svh; width: auto; object-fit: contain; }
.home:not(.logged-in) .ic-site-footer {
    padding-block: 1rem !important;
    margin-block: 0;
}
.home:not(.logged-in) .ic-site-footer :is(.wp-block-spacer, .wp-block-columns) { display: none; }
.home:not(.logged-in) .ic-site-footer p { margin-block: 0; }
.home:not(.logged-in) .wp-site-blocks > .wp-block-template-part { margin-block-start: 0; }
