/* CSCN Gallery on the website. Album cards, photo wall (masonry by CSS columns), full screen viewer.
   Uses the CSCN Site tokens; shadows not borders; hover only. */

.cscng { max-width: 1180px; margin: 0 auto; }
.cscng__year { margin: 0 0 24px; font: 600 28px/1.2 var(--c-hf); }
.cscng__year:not(:first-child) { margin-top: 70px; }
.cscng-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; }
.cscng-card { display: flex; flex-direction: column; border-radius: var(--c-radius); overflow: hidden; background: #fff; text-decoration: none; box-shadow: 0 14px 36px rgba(22, 23, 43, .08); transition: transform .25s, box-shadow .25s; }
.cscng-card:hover { transform: translateY(-4px); box-shadow: 0 22px 46px rgba(22, 23, 43, .14); }
.cscng-card__img { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--c-soft); }
.cscng-card__img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s; }
.cscng-card:hover .cscng-card__img img { transform: scale(1.05); }
.cscng-card__count { position: absolute; right: 12px; bottom: 12px; padding: 6px 12px; border-radius: 50px; background: rgba(0, 0, 0, .6); color: #fff; font: 500 14px/1 var(--c-bf); }
.cscng-card__count i { margin-right: 4px; }
.cscng-card__body { display: flex; flex-direction: column; gap: 6px; padding: 20px 24px 24px; }
.cscng-card__when { font-size: 14px; font-weight: 500; color: var(--c-muted); }
.cscng-card__title { font: 600 21px/1.25 var(--c-hf); color: var(--c-ink); }
.cscng-card:hover .cscng-card__title { color: var(--c-green); }
.cscng-card__about { font-size: 15.5px; line-height: 1.5; color: var(--c-text); }
.cscng__all { margin: 30px 0 0; text-align: center; font-weight: 600; }
.cscng__all a { text-decoration: none; }
.cscng-empty { display: flex; gap: 26px; align-items: flex-start; max-width: 1180px; margin: 0 auto; padding: 40px 44px; border-radius: 0 0 80px 0; background: var(--c-soft); }
.cscng-empty > span { flex: none; width: 64px; height: 64px; border-radius: 50%; background: var(--c-green); color: #fff; display: grid; place-items: center; font-size: 24px; }
.cscng-empty h3 { margin: 4px 0 8px; font: 600 26px/1.2 var(--c-hf); }
.cscng-empty p { margin: 0; }

/* album page */
.cscng-album__about { margin: 0; max-width: 760px; font-size: 19px; line-height: 1.55; color: rgba(255, 255, 255, .9); }
.cscn-story__hero:not(.has-photo) .cscng-album__about { color: var(--c-text); }
.cscng-wall { max-width: 1240px; margin: 0 auto; padding: 56px 32px 20px; columns: 3 300px; column-gap: 16px; }
.cscng-wall__item { display: block; margin: 0 0 16px; break-inside: avoid; border-radius: 12px; overflow: hidden; background: var(--c-soft); cursor: zoom-in; }
.cscng-wall__item img { display: block; width: 100%; height: auto; transition: transform .5s, filter .3s; }
.cscng-wall__item:hover img { transform: scale(1.03); filter: brightness(1.05); }
.cscng-wall__item:focus-visible { outline: 3px solid var(--c-green); outline-offset: 2px; }
.cscng-album__foot { max-width: 1240px; margin: 0 auto; padding: 10px 32px 70px; }
.cscng-album__foot .cscn-story__share { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 0; }
.cscng-album__foot .cscn-story__share strong { margin-right: 6px; color: var(--c-ink); }

/* viewer */
.cscng-lock { overflow: hidden; }
.cscng-viewer { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(10, 12, 20, .94); color: #fff; }
.cscng-viewer::backdrop { background: rgba(10, 12, 20, .94); }
.cscng-viewer[open] { display: flex; align-items: center; justify-content: center; }
.cscng-viewer__fig { margin: 0; width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 60px 90px; box-sizing: border-box; }
.cscng-viewer__fig img { max-width: 100%; max-height: calc(100% - 40px); object-fit: contain; border-radius: 6px; opacity: 0; transition: opacity .25s; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }
.cscng-viewer__fig img.is-in { opacity: 1; }
.cscng-viewer__fig figcaption { font-size: 15.5px; color: rgba(255, 255, 255, .85); text-align: center; max-width: 800px; }
.cscng-viewer__count { position: absolute; left: 24px; top: 18px; margin: 0; font: 500 15px var(--c-bf); color: rgba(255, 255, 255, .8); }
.cscn-site .cscng-viewer .cscng-viewer__btn { position: absolute; width: 52px; height: 52px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .12); color: #fff; font: 400 32px/52px var(--c-bf); text-align: center; padding: 0; cursor: pointer; transition: background .2s; }
.cscn-site .cscng-viewer .cscng-viewer__btn:hover, .cscn-site .cscng-viewer .cscng-viewer__btn:focus-visible { background: rgba(255, 255, 255, .25); color: #fff; }
.cscng-viewer__btn.is-close { right: 18px; top: 12px; }
.cscng-viewer__btn.is-prev { left: 20px; top: 50%; margin-top: -26px; }
.cscng-viewer__btn.is-next { right: 20px; top: 50%; margin-top: -26px; }

@media (max-width: 1024px) { .cscng-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 767px) {
	.cscng-cards { grid-template-columns: 1fr; gap: 22px; }
	.cscng-wall { columns: 2; column-gap: 10px; padding: 30px 14px 10px; }
	.cscng-wall__item { margin-bottom: 10px; border-radius: 8px; }
	.cscng-album__foot { padding: 10px 20px 50px; }
	.cscng-viewer__fig { padding: 60px 10px 80px; }
	.cscng-viewer__btn.is-prev, .cscng-viewer__btn.is-next { top: auto; bottom: 18px; margin-top: 0; }
	.cscng-viewer__btn.is-prev { left: calc(50% - 64px); }
	.cscng-viewer__btn.is-next { right: calc(50% - 64px); }
	.cscng-empty { flex-direction: column; padding: 30px 24px; border-radius: 0 0 50px 0; }
	.cscng-album__about { font-size: 16.5px; }
}
