/* Comedy Cabana – Photo Gallery (mu-plugin). Loaded only on gallery pages. */
.sg-index,.sg-album,.sg-lb{
	--sg-canvas:var(--ss-canvas,#0B1026);
	--sg-surface:var(--ss-surface-1,#141A3A);
	--sg-surface-2:var(--ss-surface-2,#1B2248);
	--sg-border:var(--ss-border,#293361);
	--sg-type:var(--ss-type,#FFF8E7);
	--sg-muted:var(--ss-muted,#B9BFD9);
	--sg-action:var(--ss-action,#FF3D9A);
	--sg-gold:var(--ss-gold,#F2EA08);
	--sg-head:"Fjalla One","Arial Narrow",Impact,sans-serif;
	font-family:"PT Sans",system-ui,-apple-system,"Segoe UI",sans-serif;
	color:var(--sg-type);
}
.sg-index *,.sg-album *,.sg-lb *{box-sizing:border-box}
.sg-index a:focus-visible,.sg-album a:focus-visible,.sg-lb button:focus-visible{outline:3px solid var(--sg-gold);outline-offset:3px}

/* ---------------------------------------------------------------- index */
.sg-index__summary{margin:0 0 8px;text-align:center;color:var(--sg-muted);font-size:15px;letter-spacing:.04em}
.sg-month{margin:40px 0 0}
.sg-month__title{display:flex;align-items:center;gap:16px;margin:0 0 18px;font-family:var(--sg-head);font-size:clamp(22px,2.6vw,30px);font-weight:400;letter-spacing:.06em;text-transform:uppercase;color:var(--sg-gold);line-height:1.2}
.sg-month__title::after{content:"";flex:1;height:1px;background:var(--sg-border)}
.sg-cards{list-style:none;margin:0;padding:0;display:grid;gap:16px;grid-template-columns:repeat(auto-fill,minmax(240px,1fr))}
.sg-card[hidden],.sg-month[hidden]{display:none}
.sg-card__link{display:flex;flex-direction:column;height:100%;background:var(--sg-surface);border:1px solid var(--sg-border);border-radius:4px;overflow:hidden;color:var(--sg-type);text-decoration:none}
.sg-card__link:hover{border-color:var(--sg-action)}
.sg-card__media{display:block;aspect-ratio:3/2;background:var(--sg-surface-2);overflow:hidden}
.sg-card__media img{display:block;width:100%;height:100%;object-fit:cover}
.sg-card__body{display:flex;flex-direction:column;gap:4px;padding:14px 16px 16px}
.sg-card__eyebrow{font-family:var(--sg-head);font-size:13px;font-weight:400;letter-spacing:.16em;text-transform:uppercase;color:var(--sg-gold)}
.sg-card__title{font-family:var(--sg-head);font-size:21px;font-weight:400;letter-spacing:.02em;line-height:1.2;color:var(--sg-type)}
.sg-card__meta{font-size:14px;color:var(--sg-muted)}
@media (max-width:600px){.sg-cards{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.sg-card__body{padding:10px 10px 12px}.sg-card__title{font-size:17px}.sg-card__meta{font-size:13px}.sg-month{margin-top:28px}.sg-month__title{font-size:22px;margin-bottom:12px}}
.sg-more{display:flex;justify-content:center;margin:40px 0 0}
.sg-more__btn{min-height:48px}
.sg-empty{text-align:center;color:var(--sg-muted)}

/* ---------------------------------------------------------------- album */
.sg-album--page{padding:48px 0 80px}
.sg-album__head{text-align:center;margin:0 0 28px}
.sg-back{display:flex;width:fit-content;align-items:center;gap:8px;min-height:44px;padding:0 4px;margin:0 auto 10px;color:var(--sg-muted);font-weight:600;text-decoration:none}
.sg-back:hover{color:var(--sg-type)}
.sg-album .sg-album__eyebrow{display:block;margin:0 0 8px;color:var(--sg-gold)}
.sg-album__title{margin:0 0 10px;font-family:var(--sg-head);font-size:clamp(32px,4.8vw,60px);font-weight:400;line-height:1.05;letter-spacing:0;color:var(--sg-type);text-wrap:balance}
.sg-album__meta{margin:0;color:var(--sg-muted);font-size:15px}

/* Justified rows: each tile grows in proportion to its aspect ratio so a row shares one height. */
.sg-grid{--rh:230px;display:flex;flex-wrap:wrap;gap:6px}
.sg-grid::after{content:"";flex-grow:999999}
.sg-item{position:relative;display:block;flex-grow:calc(var(--r) * 100);flex-basis:calc(var(--r) * var(--rh));aspect-ratio:var(--r);max-height:calc(var(--rh) * 2.2);background:var(--sg-surface-2);border-radius:2px;overflow:hidden}
.sg-item img{display:block;width:100%;height:100%;object-fit:cover}
.sg-item:hover img{opacity:.88}
@media (max-width:900px){.sg-grid{--rh:170px}}
@media (max-width:600px){.sg-grid{--rh:100px;gap:4px}.sg-album--page{padding:28px 0 56px}}

.sg-pager{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:12px;margin:40px 0 0;padding:20px 0 0;border-top:1px solid var(--sg-border)}
.sg-pager__link{display:flex;flex-direction:column;gap:2px;min-height:44px;justify-content:center;color:var(--sg-type);text-decoration:none}
.sg-pager__link--older{text-align:right;align-items:flex-end}
.sg-pager__dir{font-family:var(--sg-head);font-size:14px;font-weight:400;letter-spacing:.14em;text-transform:uppercase;color:var(--sg-muted)}
.sg-pager__date{font-family:var(--sg-head);font-size:19px;font-weight:400;letter-spacing:.02em;color:var(--sg-gold)}
.sg-pager__link:hover .sg-pager__dir{color:var(--sg-type)}
.sg-pager__all{display:inline-flex;align-items:center;min-height:44px;padding:0 18px;border:2px solid var(--sg-type);color:var(--sg-type);font-family:var(--sg-head);font-size:14px;font-weight:400;letter-spacing:.14em;text-transform:uppercase;text-decoration:none}
.sg-pager__all:hover{background:var(--sg-type);color:var(--sg-canvas)}
@media (max-width:600px){
	.sg-pager{grid-template-columns:1fr 1fr}
	.sg-pager__all{grid-column:1 / -1;grid-row:2;justify-content:center}
	.sg-pager__date{font-size:17px}
}

/* ------------------------------------------------------------- lightbox */
.sg-lb{position:fixed;inset:0;z-index:999999;display:flex;align-items:center;justify-content:center;background:rgba(11,16,38,.96);touch-action:pan-y pinch-zoom}
.sg-lb[hidden]{display:none}
.sg-lb__fig{margin:0;width:100%;height:100%;display:flex;align-items:center;justify-content:center;padding:64px 72px}
.sg-lb__img{display:block;max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;border-radius:2px;background:var(--sg-surface-2);user-select:none;-webkit-user-select:none}
.sg-lb__bar{position:absolute;top:0;left:0;right:0;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px 10px 20px;background:linear-gradient(rgba(11,16,38,.85),rgba(11,16,38,0))}
.sg-lb__count{font-size:15px;font-weight:600;color:var(--sg-type);letter-spacing:.06em;font-variant-numeric:tabular-nums}
.sg-lb__title{font-size:14px;color:var(--sg-muted);margin-left:12px}
.sg-lb button{appearance:none;-webkit-appearance:none;display:inline-flex;align-items:center;justify-content:center;width:48px;height:48px;padding:0;margin:0;border:1px solid var(--sg-border);border-radius:4px;background:rgba(20,26,58,.85);color:var(--sg-type);cursor:pointer;line-height:1}
.sg-lb button:hover{border-color:var(--sg-action);background:var(--sg-action)}
.sg-lb button svg{width:22px;height:22px;stroke:currentColor;fill:none;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}
.sg-lb__nav{position:absolute;top:50%;transform:translateY(-50%)}
.sg-lb__prev{left:12px}
.sg-lb__next{right:12px}
.sg-lb__spin{position:absolute;top:50%;left:50%;width:36px;height:36px;margin:-18px 0 0 -18px;border:3px solid var(--sg-border);border-top-color:var(--sg-gold);border-radius:50%;opacity:0;pointer-events:none}
.sg-lb.is-loading .sg-lb__spin{opacity:1}
@media (max-width:700px){
	.sg-lb__fig{padding:60px 0 76px}
	.sg-lb__nav{top:auto;bottom:14px;transform:none}
	.sg-lb__prev{left:calc(50% - 60px)}
	.sg-lb__next{right:calc(50% - 60px)}
	.sg-lb__title{display:none}
}
html.sg-lb-open,html.sg-lb-open body{overflow:hidden}

@media (prefers-reduced-motion:no-preference){
	.sg-card__media img{transition:transform .35s ease}
	.sg-card__link:hover .sg-card__media img{transform:scale(1.04)}
	.sg-card__link{transition:border-color .2s ease}
	.sg-item img{transition:opacity .2s ease}
	.sg-lb__img{transition:opacity .18s ease}
	.sg-lb.is-loading .sg-lb__spin{animation:sg-spin .8s linear infinite}
}
@keyframes sg-spin{to{transform:rotate(360deg)}}
