.classroom-gallery {
    box-sizing: border-box;
    width: 100%;
    max-width: 1000px;
    margin: 46px auto 50px;
    padding: 0;
    border: 0;
    background: #fff;
    color: #19253a;
    text-align: left;
    font: 400 14px/1.5 'Noto Sans KR', 'Malgun Gothic', sans-serif;
}

.classroom-gallery .classroom-gallery__header {
    box-sizing: border-box;
    display: flex;
    float: none;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 0 0 17px;
}

.classroom-gallery #classroom-gallery-title {
    min-width: 0;
    margin: 0;
    position: relative;
    padding: 3px 0 3px 18px;
    color: #202020;
    font: 700 27px/1.25 'Noto Sans KR', 'Malgun Gothic', sans-serif;
    letter-spacing: -.045em;
    text-align: left;
    word-break: keep-all;
}

.classroom-gallery #classroom-gallery-title::before {
    position: absolute;
    top: 2px;
    bottom: 2px;
    left: 0;
    width: 6px;
    border-radius: 6px;
    background: #efaa20;
    content: '';
}

.classroom-gallery .classroom-gallery__heading {
    box-sizing: border-box;
    display: flex;
    min-width: 0;
    width: auto;
    align-items: center;
    gap: 12px;
}

.classroom-gallery .classroom-gallery__more {
    display: inline-flex;
    flex: none;
    align-items: center;
    gap: 5px;
    min-height: 38px;
    color: #333;
    font: 600 14px/1 'Noto Sans KR', 'Malgun Gothic', sans-serif;
    text-decoration: none;
    white-space: nowrap;
}

.classroom-gallery .classroom-gallery__more:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.classroom-gallery .classroom-gallery__more span {
    font: 400 19px/1 Arial, sans-serif;
}

.classroom-gallery .classroom-gallery__viewport,
.classroom-gallery .classroom-gallery__track {
    box-sizing: border-box;
    width: 100%;
    float: none;
}

.classroom-gallery .classroom-gallery__viewport {
    overflow: hidden;
    touch-action: pan-y;
}

.classroom-gallery .classroom-gallery__track {
    display: flex;
    align-items: stretch;
    transition: transform 260ms ease;
}

.classroom-gallery .classroom-gallery__page {
    box-sizing: border-box;
    flex: 0 0 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    min-width: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.classroom-gallery .classroom-gallery__card {
    box-sizing: border-box;
    min-width: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.classroom-gallery .classroom-gallery__zoom {
    box-sizing: border-box;
    position: relative;
    display: block;
    height: 100%;
    color: #252525;
    text-decoration: none;
    cursor: zoom-in;
}

.classroom-gallery .classroom-gallery__zoom::after {
    position: absolute;
    top: 9px;
    right: 9px;
    display: grid;
    place-items: center;
    width: 27px;
    height: 27px;
    border: 1px solid rgba(255, 255, 255, .6);
    border-radius: 3px;
    background: rgba(20, 20, 20, .66);
    color: #fff;
    font: 400 20px/1 Arial, sans-serif;
    content: '+';
    pointer-events: none;
}

.classroom-gallery .classroom-gallery__zoom img {
    display: block;
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    border-radius: 3px;
    background: #f0efed;
}

.classroom-gallery .classroom-gallery__caption {
    box-sizing: border-box;
    display: block;
    overflow: hidden;
    padding: 9px 0 3px;
    color: inherit;
    font: 600 15px/1.45 'Noto Sans KR', 'Malgun Gothic', sans-serif;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.classroom-gallery .classroom-gallery__controls {
    box-sizing: border-box;
    width: auto;
    flex: none;
    display: flex;
    overflow: hidden;
    border: 1px solid #dedede;
    border-radius: 4px;
    background: #fff;
}

.classroom-gallery .classroom-gallery__controls[hidden] {
    display: none;
}

.classroom-gallery .classroom-gallery__controls button,
.classroom-gallery .classroom-gallery__close {
    box-sizing: border-box;
    display: inline-grid;
    align-items: center;
    justify-content: center;
    min-width: 35px;
    min-height: 34px;
    padding: 0 8px;
    border: 1px solid #dedede;
    border-radius: 4px;
    background: #fff;
    color: #333;
    cursor: pointer;
    font: 400 22px/1 Arial, sans-serif;
}

.classroom-gallery .classroom-gallery__controls button {
    border: 0;
    border-radius: 0;
}

.classroom-gallery .classroom-gallery__controls button + button {
    border-left: 1px solid #dedede;
}

.classroom-gallery .classroom-gallery__controls button:disabled {
    color: #aaa;
    cursor: default;
}

.classroom-gallery .classroom-gallery__controls button:enabled:hover,
.classroom-gallery .classroom-gallery__close:hover,
.classroom-gallery .classroom-gallery__zoom:hover::after {
    background: #f6f3eb;
    color: #252525;
}

.classroom-gallery a:focus-visible,
.classroom-gallery button:focus-visible {
    outline: 2px solid #995b13;
    outline-offset: -2px;
}

.classroom-gallery .classroom-gallery__status {
    margin: 6px 0 0;
    text-align: center;
    color: #485a73;
    font: 400 13px/1.4 'Noto Sans KR', 'Malgun Gothic', sans-serif;
}

.classroom-gallery .classroom-gallery__status:empty {
    display: none;
}

.classroom-gallery .classroom-gallery__dialog:not([open]) {
    display: none;
}

.classroom-gallery .classroom-gallery__dialog[open] {
    position: fixed;
    inset: 0;
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 0;
    background: transparent;
    color: #fff;
}

.classroom-gallery .classroom-gallery__dialog::backdrop {
    background: rgba(0, 0, 0, .94);
}

.classroom-gallery .classroom-gallery__dialog-stage {
    position: absolute;
    inset: 0;
    box-sizing: border-box;
    display: grid;
    grid-template: minmax(0, 1fr) / minmax(0, 1fr);
    place-items: center;
    width: 100%;
    padding: 55px 64px;
    touch-action: pan-y;
}

.classroom-gallery .classroom-gallery__full {
    display: block;
    width: auto;
    height: auto;
    min-width: 0;
    min-height: 0;
    max-width: 100%;
    max-height: min(100%, 82dvh);
    margin: 0;
    object-fit: contain;
}

.classroom-gallery .classroom-gallery__dialog button {
    position: absolute;
    z-index: 1;
    box-sizing: border-box;
    display: grid;
    place-items: center;
    width: 46px;
    min-width: 44px;
    height: 46px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .24);
    border-radius: 50%;
    background: rgba(0, 0, 0, .58);
    color: #fff;
    font: 400 29px/1 Arial, sans-serif;
    cursor: pointer;
}

.classroom-gallery .classroom-gallery__close {
    top: 10px;
    right: 10px;
    font-size: 27px;
}

.classroom-gallery .classroom-gallery__photo-prev,
.classroom-gallery .classroom-gallery__photo-next {
    top: 50%;
    transform: translateY(-50%);
}

.classroom-gallery .classroom-gallery__photo-prev { left: 8px; }
.classroom-gallery .classroom-gallery__photo-next { right: 8px; }

.classroom-gallery .classroom-gallery__dialog button:disabled {
    opacity: .3;
    cursor: default;
}

.classroom-gallery .classroom-gallery__dialog button:enabled:hover {
    border-color: rgba(255, 255, 255, .65);
    background: rgba(45, 45, 45, .85);
    color: #fff;
}

.classroom-gallery .classroom-gallery__dialog button:focus-visible {
    outline-color: #fff;
}

.classroom-gallery #classroom-photo-title,
.classroom-gallery .classroom-gallery__photo-status {
    position: absolute;
    left: 50%;
    box-sizing: border-box;
    width: min(850px, calc(100% - 40px));
    margin: 0;
    transform: translateX(-50%);
    color: #fff;
    font: 400 14px/1.4 'Noto Sans KR', 'Malgun Gothic', sans-serif;
    text-align: center;
    pointer-events: none;
}

.classroom-gallery #classroom-photo-title {
    bottom: 18px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.classroom-gallery .classroom-gallery__photo-status {
    bottom: 44px;
}

.classroom-gallery .classroom-gallery__photo-status:empty {
    display: none;
}

.classroom-gallery.classroom-gallery--mobile {
    clear: both;
    display: flow-root;
    margin: 0 auto;
    padding: 18px 16px 12px;
    border-top: 1px solid #e8e8e8;
}

.classroom-gallery--mobile .classroom-gallery__header {
    margin-bottom: 12px;
}
.classroom-gallery--mobile .classroom-gallery__heading { gap: 9px; }

.classroom-gallery--mobile #classroom-gallery-title {
    font-size: 24px;
}

.classroom-gallery--mobile .classroom-gallery__page {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.classroom-gallery--mobile .classroom-gallery__zoom img {
    aspect-ratio: 4 / 3;
}

.classroom-gallery--mobile .classroom-gallery__caption {
    font-size: 15px;
}

.classroom-gallery--mobile .classroom-gallery__dialog-stage { padding-inline: 49px; }
.classroom-gallery--mobile .classroom-gallery__photo-prev { left: 4px; }
.classroom-gallery--mobile .classroom-gallery__photo-next { right: 4px; }

.classroom-gallery--mobile .classroom-gallery__controls button,
.classroom-gallery--mobile .classroom-gallery__close {
    min-width: 44px;
    min-height: 44px;
}

@media (prefers-reduced-motion: reduce) {
    .classroom-gallery .classroom-gallery__track { transition: none; }
}
