/* SignEditor gallery viewer 0.19.1 */
.se-gallery {
    --se-gallery-index: 0;
    position: relative;
    clear: both;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    margin: 1.25em auto;
    padding: 0;
    border: 0;
    background: transparent;
}

.se-gallery-track {
    box-sizing: border-box;
    width: 100%;
}

.se-gallery-item {
    position: relative;
    min-width: 0;
    overflow: hidden;
    border-radius: 9px;
    background: #eef2f7;
}

.se-gallery-item > img {
    display: block;
    width: 100% !important;
    max-width: 100%;
    height: auto;
    margin: 0;
}

.se-gallery-collage > .se-gallery-track {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr));
    gap: 8px;
}

.se-gallery-collage[data-gallery-columns="2"] > .se-gallery-track {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.se-gallery-collage[data-gallery-columns="3"] > .se-gallery-track {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.se-gallery-collage .se-gallery-item > img {
    height: 100% !important;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.se-gallery-slider {
    overflow: hidden;
    border-radius: 11px;
    background: #111827;
}

.se-gallery-slider > .se-gallery-track {
    display: flex;
    align-items: stretch;
    transform: translateX(calc(var(--se-gallery-index) * -100%));
    transition: transform .28s ease;
    will-change: transform;
}

.se-gallery-slider .se-gallery-item {
    display: flex;
    flex: 0 0 100%;
    align-items: center;
    justify-content: center;
    min-width: 100%;
    border-radius: 0;
    background: #111827;
}

.se-gallery-slider .se-gallery-item > img {
    width: 100% !important;
    height: clamp(260px, 58vw, 720px) !important;
    object-fit: contain;
}

.se-gallery-view-controls {
    position: absolute;
    inset: 50% 12px auto;
    z-index: 4;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    transform: translateY(-50%);
}

.se-gallery-view-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .42);
    border-radius: 50%;
    background: rgba(15, 23, 42, .64);
    color: #fff;
    font: 400 30px/1 system-ui, sans-serif;
    box-shadow: 0 3px 15px rgba(0, 0, 0, .25);
    cursor: pointer;
    pointer-events: auto;
}

.se-gallery-view-button:hover,
.se-gallery-view-button:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
    background: rgba(15, 23, 42, .88);
}

.se-gallery-dots {
    position: absolute;
    right: 14px;
    bottom: 12px;
    left: 14px;
    z-index: 4;
    display: flex;
    justify-content: center;
    gap: 6px;
    pointer-events: none;
}

.se-gallery-dot {
    width: 8px;
    height: 8px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, .58);
    box-shadow: 0 1px 4px rgba(0, 0, 0, .25);
    cursor: pointer;
    pointer-events: auto;
    transition: width .18s ease, background-color .18s ease;
}

.se-gallery-dot.is-active {
    width: 22px;
    background: #fff;
}

@media (max-width: 640px) {
    .se-gallery-collage[data-gallery-columns="3"] > .se-gallery-track {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .se-gallery-slider .se-gallery-item > img {
        height: clamp(220px, 72vw, 520px) !important;
    }

    .se-gallery-view-controls {
        right: 8px;
        left: 8px;
    }

    .se-gallery-view-button {
        width: 36px;
        height: 36px;
        font-size: 25px;
    }
}

@media (max-width: 420px) {
    .se-gallery-collage > .se-gallery-track,
    .se-gallery-collage[data-gallery-columns="2"] > .se-gallery-track,
    .se-gallery-collage[data-gallery-columns="3"] > .se-gallery-track {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .se-gallery-slider > .se-gallery-track,
    .se-gallery-dot {
        transition: none;
    }
}

/* SignEditor 0.19.0 — published YouTube and quote blocks */
.se-youtube-embed {
    box-sizing: border-box;
    width: min(100%, 960px);
    margin: 1.5em auto;
}

.se-youtube-embed .se-youtube-frame {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 11px;
    background: #10131a;
    aspect-ratio: 16 / 9;
}

/* Rebuilder and legacy board skins can otherwise leave an iframe at the
   browser default 300x150 size. Keep published videos full-width even when
   the skin declares its own generic iframe dimensions. */
#bo_v_con figure.se-youtube-embed,
.rb_bbs_wrap #bo_v_con figure.se-youtube-embed {
    display: block;
    width: 100% !important;
    max-width: 960px !important;
    margin-right: auto !important;
    margin-left: auto !important;
}

#bo_v_con .se-youtube-embed .se-youtube-frame,
.rb_bbs_wrap #bo_v_con .se-youtube-embed .se-youtube-frame {
    width: 100% !important;
    height: 0 !important;
    padding-bottom: 56.25% !important;
    aspect-ratio: auto;
}

.se-youtube-embed .se-youtube-frame iframe {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

#bo_v_con .se-youtube-embed .se-youtube-frame iframe,
.rb_bbs_wrap #bo_v_con .se-youtube-embed .se-youtube-frame iframe {
    width: 100% !important;
    max-width: none !important;
    height: 100% !important;
}

.se-youtube-embed figcaption {
    padding: 9px 4px 0;
    color: #6d7a91;
    font-size: 13px;
    line-height: 1.5;
    text-align: center;
}

.se-youtube-embed figcaption a {
    color: #315da8;
    text-decoration: none;
}

blockquote.se-quote {
    box-sizing: border-box;
    width: 100%;
    margin: 1.4em 0;
    color: #3c485f;
    line-height: 1.75;
}

blockquote.se-quote-line {
    padding: 4px 0 4px 18px;
    border-left: 4px solid #526da8;
}

blockquote.se-quote-box {
    padding: 18px 20px;
    border-radius: 10px;
    background: #f2f5fa;
}

blockquote.se-quote-mark {
    position: relative;
    padding: 19px 24px 16px 54px;
    border-top: 1px solid #dce2ed;
    border-bottom: 1px solid #dce2ed;
}

blockquote.se-quote-mark::before {
    position: absolute;
    top: 9px;
    left: 15px;
    color: #7085b4;
    content: "“";
    font: 700 46px/1 Georgia, serif;
}
