.orange-gallery {
    --orange-gallery-accent: var(--heo-theme, #425aef);
    --orange-gallery-ink: var(--heo-fontcolor, #263043);
    --orange-gallery-muted: var(--heo-secondtext, #687184);
    --orange-gallery-surface: var(--heo-card-bg, #fff);
    --orange-gallery-border: var(--heo-card-border, #e8ebf1);
    --orange-gallery-wash: var(--heo-secondbg, #f4f6fa);
    max-width: 960px;
    margin: 12px auto 24px;
    color: var(--orange-gallery-ink);
    text-align: left;
    font-family: inherit;
    overflow-wrap: anywhere;
}

.orange-gallery *, .orange-gallery-lightbox * { box-sizing: border-box; }
.orange-gallery [hidden] { display: none !important; }
.orange-gallery .orange-gallery__header { margin-bottom: 24px; }
.orange-gallery .orange-gallery__eyebrow,
.orange-gallery .orange-gallery__chapter {
    margin: 0 0 10px;
    color: var(--orange-gallery-accent);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: .06em;
}
.orange-gallery .orange-gallery__heading {
    margin: 0 0 12px;
    padding: 0;
    font-family: "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", serif;
    font-size: clamp(22px, 3vw, 30px);
    font-weight: 500;
    line-height: 1.5;
}
.orange-gallery .orange-gallery__intro {
    margin: 0;
    color: var(--orange-gallery-muted);
    font-size: 14px;
    line-height: 1.8;
}
.orange-gallery .orange-gallery__frame {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
}
.orange-gallery.is-enhanced .orange-gallery__frame {
    aspect-ratio: 3 / 2;
    background: var(--orange-gallery-wash);
}
.orange-gallery .orange-gallery__art-link {
    display: block;
    padding: 0;
    border: 0;
    background: transparent;
    text-decoration: none;
    height: 100%;
}
#article-container .orange-gallery .orange-gallery__image,
.orange-gallery .orange-gallery__image {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
    margin: 0;
    padding: 0;
    border-radius: 0;
    object-fit: contain;
    transform: none;
    box-shadow: none;
    opacity: 1;
}
#article-container .orange-gallery.is-enhanced .orange-gallery__image,
.orange-gallery.is-enhanced .orange-gallery__image {
    height: 100%;
    transition: opacity .18s ease;
}
/* Once loaded, this hiding rule must stop matching, including inside the theme's article container. */
#article-container .orange-gallery.is-enhanced:not(.is-image-ready) .orange-gallery__image,
.orange-gallery.is-enhanced:not(.is-image-ready) .orange-gallery__image { opacity: 0; }
.orange-gallery .orange-gallery__loading,
.orange-gallery .orange-gallery__image-error {
    position: absolute;
    inset: 0;
    display: grid;
    place-content: center;
    margin: 0;
    padding: 24px;
    text-align: center;
    color: var(--orange-gallery-muted);
    font-size: 14px;
    pointer-events: none;
}
.orange-gallery .orange-gallery__reading { padding: 26px 0 24px; }
#article-container .orange-gallery .orange-gallery__quote,
.orange-gallery .orange-gallery__quote {
    margin: 0 0 18px;
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
    color: var(--orange-gallery-ink);
    font-family: "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", serif;
    font-size: clamp(19px, 2.6vw, 24px);
    font-weight: 500;
    line-height: 1.8;
}
.orange-gallery .orange-gallery__quote::before,
.orange-gallery .orange-gallery__quote::after { content: none; }
.orange-gallery .orange-gallery__quote p { margin: 0; }
.orange-gallery .orange-gallery__reflection p {
    margin: 0 0 12px;
    color: var(--orange-gallery-muted);
    font-size: 15px;
    line-height: 1.95;
}
.orange-gallery .orange-gallery__reflection p:last-child { margin-bottom: 0; }
.orange-gallery .orange-gallery__footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px 24px;
    padding-top: 18px;
    border-top: 1px solid var(--orange-gallery-border);
}
.orange-gallery .orange-gallery__credit {
    flex: 1 1 240px;
    margin: 0;
    color: var(--orange-gallery-muted);
    font-size: 12px;
    line-height: 1.8;
}
.orange-gallery .orange-gallery__actions { display: flex; align-items: center; gap: 22px; }
.orange-gallery .orange-gallery__original {
    border: 0;
    color: var(--orange-gallery-muted);
    font-size: 13px;
    text-decoration: none;
}
.orange-gallery .orange-gallery__next {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 18px;
    border: 0;
    border-radius: 10px;
    background: var(--orange-gallery-accent);
    color: #fff;
    font: inherit;
    font-size: 14px;
    cursor: pointer;
}
.orange-gallery .orange-gallery__next:hover { filter: brightness(1.08); }
.orange-gallery .orange-gallery__next:active { transform: translateY(1px); }
.orange-gallery a:focus-visible,
.orange-gallery button:focus-visible,
.orange-gallery-lightbox a:focus-visible,
.orange-gallery-lightbox button:focus-visible {
    outline: 3px solid var(--heo-theme, #425aef);
    outline-offset: 4px;
}
.orange-gallery .orange-gallery__status {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}
.orange-gallery-lightbox {
    width: min(1200px, calc(100vw - 32px));
    max-width: none;
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
    padding: 18px;
    border: 1px solid var(--heo-card-border, #e8ebf1);
    border-radius: 16px;
    background: var(--heo-card-bg, #fff);
    color: var(--heo-fontcolor, #263043);
}
.orange-gallery-lightbox::backdrop { background: rgba(10, 16, 24, .78); }
.orange-gallery-lightbox__toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.orange-gallery-lightbox__title { margin: 0; font-size: 14px; line-height: 1.8; }
.orange-gallery-lightbox__close {
    flex: none;
    min-height: 44px;
    padding: 8px 12px;
    border: 0;
    border-radius: 8px;
    background: var(--heo-secondbg, #f4f6fa);
    color: inherit;
    font: inherit;
    font-size: 14px;
    cursor: pointer;
}
.orange-gallery-lightbox .orange-gallery-lightbox__image {
    display: block;
    width: 100%;
    height: auto;
    max-height: calc(100vh - 140px);
    max-height: calc(100dvh - 140px);
    margin: 0;
    border: 0;
    object-fit: contain;
}
@media (max-width: 600px) {
    .orange-gallery { margin-top: 8px; }
    .orange-gallery .orange-gallery__header { margin-bottom: 18px; }
    .orange-gallery .orange-gallery__frame { border-radius: 10px; }
    .orange-gallery .orange-gallery__reading { padding: 20px 0; }
    .orange-gallery .orange-gallery__actions { width: 100%; justify-content: space-between; }
    .orange-gallery-lightbox { width: calc(100vw - 20px); padding: 12px; border-radius: 10px; }
}
@media (prefers-reduced-motion: reduce) {
    .orange-gallery .orange-gallery__image { transition: none; }
    .orange-gallery .orange-gallery__next:active { transform: none; }
}
