/* Fox Valley Daily Digest: Photo Gallery (/photos/). Uniform grid + lightbox + Photo of the Month contest.
   4 columns from 1200px, 3 from 621px, 2 on phones. Every cell is the same 4:3 size. Short last rows stay centered. */
.gl-wrap { max-width: 1240px; }
.gl-head { text-align: center; max-width: 46rem; margin: 0 auto 1.6rem; }
.gl-head .rp-title { margin-bottom: 0.4rem; }
.gl-lead { margin: 0 0 0.9rem; color: var(--muted); font-size: 1.05rem; line-height: 1.5; }
.gl-actions { margin: 0; }
.gl-section { margin-top: 1.8rem; }
.gl-section__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.2rem 1rem; margin-bottom: 0.8rem; padding-bottom: 0.5rem; border-bottom: 2px solid var(--gold); }
.gl-section__head h2 { margin: 0; font-family: var(--font-display); color: var(--navy); font-size: 1.5rem; }
.gl-section__head p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.gl-grid { --cols: 4; --gap: 1rem; list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: var(--gap); }
.gl-item { position: relative; flex: 0 0 calc((100% - (var(--cols) - 1) * var(--gap)) / var(--cols)); max-width: calc((100% - (var(--cols) - 1) * var(--gap)) / var(--cols)); min-width: 0; margin: 0; display: flex; }
.gl-link { display: flex; flex-direction: column; width: 100%; background: var(--paper); border: 1px solid var(--card-border); border-radius: var(--radius); overflow: hidden; color: inherit; text-decoration: none; box-shadow: 0 6px 18px rgba(11, 61, 92, 0.07); transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease; }
.gl-link:hover { border-color: var(--gold); box-shadow: 0 10px 26px rgba(11, 61, 92, 0.16); color: inherit; }
.gl-link:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.gl-media { position: relative; display: block; overflow: hidden; background: var(--navy-deep); aspect-ratio: 4 / 3; }
.gl-media picture, .gl-media img { display: block; width: 100%; height: 100%; }
.gl-media img { object-fit: cover; transition: transform 0.35s ease; }
.gl-item--portrait .gl-media img { object-position: center 65%; }
.gl-link:hover .gl-media img { transform: scale(1.03); }
.gl-badge { position: absolute; z-index: 1; top: 0.6rem; left: 0.6rem; display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.25rem 0.6rem; border-radius: 999px; background: var(--gold); color: var(--navy-deep); font: 700 0.72rem var(--font-ui); letter-spacing: 0.08em; text-transform: uppercase; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25); }
.gl-body { flex: 1 1 auto; display: flex; flex-direction: column; gap: 0.2rem; padding: 0.65rem 0.8rem 0.8rem; }
.gl-cap { font-family: var(--font-display); color: var(--navy); font-size: 1rem; line-height: 1.3; min-height: 2.6em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.gl-meta { font-size: 0.85rem; line-height: 1.35; min-height: 2.7em; color: var(--muted); overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.gl-empty { text-align: center; padding: 2rem 1rem; background: var(--paper); border: 1px solid var(--card-border); border-radius: var(--radius); }
.gl-empty p { margin: 0 0 1rem; }
.photo-page .site-footer p a { display: inline-block; padding: 0.7rem 0; min-height: 44px; }

@media (max-width: 1199px) { .gl-grid { --cols: 3; } }
@media (max-width: 620px) {
  .gl-grid { --cols: 2; --gap: 0.65rem; }
  .gl-section__head h2 { font-size: 1.3rem; }
  .gl-cap { font-size: 0.92rem; }
  .gl-meta { font-size: 0.78rem; }
  .gl-body { padding: 0.5rem 0.55rem 0.65rem; }
  .gl-badge { top: 0.4rem; left: 0.4rem; padding: 0.2rem 0.5rem; font-size: 0.64rem; }
}

/* Lightbox */
html.gl-lock, html.gl-lock body { overflow: hidden; }
.gl-lb { position: fixed; inset: 0; z-index: 9999; display: none; flex-direction: column; background: #04141e; color: #fff; -webkit-tap-highlight-color: transparent; }
.gl-lb.is-open { display: flex; }
.gl-lb__bar { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; padding: 0.6rem 0.8rem; padding-top: max(0.6rem, env(safe-area-inset-top)); }
.gl-lb__count { font: 600 0.85rem var(--font-ui); letter-spacing: 0.08em; text-transform: uppercase; color: #E0C45A; }
.gl-lb__btn { appearance: none; -webkit-appearance: none; display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; padding: 0; border: 1px solid rgba(255, 255, 255, 0.35); border-radius: 50%; background: rgba(255, 255, 255, 0.1); color: #fff; cursor: pointer; }
.gl-lb__btn:hover { background: rgba(255, 255, 255, 0.22); }
.gl-lb__btn:focus-visible, .gl-lb__link:focus-visible { outline: 3px solid #E0C45A; outline-offset: 2px; }
.gl-lb__btn svg { width: 22px; height: 22px; pointer-events: none; }
.gl-lb__stage { position: relative; flex: 1 1 auto; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 0 0.5rem; touch-action: pan-y; }
.gl-lb__figure { margin: 0; max-width: 100%; max-height: 100%; display: flex; align-items: center; justify-content: center; min-height: 0; }
.gl-lb__figure picture { display: block; max-width: 100%; max-height: 100%; }
.gl-lb__img { display: block; max-width: 100%; max-height: calc(100vh - 12.5rem); max-height: calc(100dvh - 12.5rem); width: auto; height: auto; object-fit: contain; border-radius: 4px; background: #0B3D5C; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5); opacity: 0; transition: opacity 0.2s ease; -webkit-user-select: none; user-select: none; }
.gl-lb__img.is-ready { opacity: 1; }
.gl-lb__nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; }
.gl-lb__nav--prev { left: 0.6rem; }
.gl-lb__nav--next { right: 0.6rem; }
.gl-lb__info { flex: 0 0 auto; text-align: center; padding: 0.7rem 1rem; padding-bottom: max(0.9rem, env(safe-area-inset-bottom)); max-width: 52rem; width: 100%; margin: 0 auto; }
.gl-lb__cap { margin: 0 0 0.2rem; font-family: var(--font-display); font-size: 1.15rem; line-height: 1.3; }
.gl-lb__meta { margin: 0; font-size: 0.92rem; color: rgba(255, 255, 255, 0.82); }
.gl-lb__meta a { color: #E0C45A; }
.gl-lb__link { display: inline-block; margin-left: 0.4rem; color: #E0C45A; font-weight: 600; }
@media (max-width: 620px) {
  .gl-lb__nav { top: auto; bottom: 0.6rem; transform: none; width: 44px; height: 44px; }
  .gl-lb__nav--prev { left: 0.8rem; }
  .gl-lb__nav--next { right: 0.8rem; }
  .gl-lb__stage { padding: 0; }
  .gl-lb__info { padding-bottom: max(3.6rem, calc(env(safe-area-inset-bottom) + 3.4rem)); }
  .gl-lb__img { max-height: calc(100vh - 16rem); max-height: calc(100dvh - 16rem); }
  .gl-lb__cap { font-size: 1.02rem; }
}
@media (prefers-reduced-motion: reduce) {
  .gl-link, .gl-media img, .gl-lb__img { transition: none; }
  .gl-link:hover .gl-media img { transform: none; }
}

/* Votes */
.gl-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.gl-vote { appearance: none; -webkit-appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; min-height: 40px; padding: 0.3rem 0.8rem; border: 1px solid var(--gold); border-radius: 999px; background: var(--paper); color: var(--navy); font: 700 0.88rem var(--font-ui); cursor: pointer; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22); -webkit-tap-highlight-color: transparent; }
html:not(.gl-vote-on) .gl-vote { display: none; }
.gl-vote__icon { width: 18px; height: 18px; flex: 0 0 auto; }
.gl-vote:hover { background: var(--gold-soft); }
.gl-vote:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }
.gl-vote[aria-pressed="true"] { background: var(--navy); color: #FFFCF7; border-color: var(--navy); cursor: default; }
.gl-vote[aria-pressed="true"] .gl-vote__icon { color: #E0C45A; }
.gl-vote:disabled:not([aria-pressed="true"]) { opacity: 0.55; cursor: not-allowed; }
.gl-vote__n { min-width: 1.2em; text-align: center; font-variant-numeric: tabular-nums; }
.gl-item > .gl-vote { position: absolute; z-index: 3; top: 0.6rem; right: 0.6rem; }
.gl-vote--lb { margin-top: 0.6rem; background: #FFFCF7; }
.gl-vote--lb[aria-pressed="true"] { background: var(--navy); border-color: #E0C45A; }
@media (max-width: 620px) {
  .gl-item > .gl-vote { top: 0.4rem; right: 0.4rem; padding: 0.25rem 0.6rem; min-height: 40px; }
  .gl-item > .gl-vote .gl-vote__label { display: none; }
}
@media (pointer: coarse) { .gl-vote { min-height: 44px; } }

/* Contest section */
.gl-contest { background: var(--paper); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 1.1rem 1.2rem 1.3rem; box-shadow: 0 6px 18px rgba(11, 61, 92, 0.07); }
.gl-contest .gl-section__head { margin-top: 0; }
.gl-cont__days { display: inline-block; padding: 0.2rem 0.75rem; border-radius: 999px; background: var(--navy); color: #FFFCF7 !important; font: 700 0.85rem var(--font-ui) !important; letter-spacing: 0.04em; }
.gl-cont__first { margin: 0 0 0.3rem; font-weight: 700; color: var(--gold-text); }
.gl-cont__lead { margin: 0 0 0.9rem; color: var(--muted); line-height: 1.5; max-width: 52rem; }
.gl-cont__status { min-height: 1.4em; margin: 0 0 0.5rem; font-weight: 600; color: var(--navy); }
.gl-cont__status.is-error { color: #8B3044; }
.gl-cont { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.9rem; }
.gl-cont__row { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr) auto; align-items: center; gap: 0.9rem; padding: 0.7rem; background: var(--cream); border: 1px solid var(--card-border); border-radius: var(--radius-sm); }
.gl-cont__thumb { appearance: none; -webkit-appearance: none; display: block; padding: 0; border: 0; border-radius: 8px; overflow: hidden; background: var(--navy-deep); aspect-ratio: 4 / 3; cursor: pointer; }
.gl-cont__thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gl-cont__thumb:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.gl-cont__info { display: flex; flex-direction: column; gap: 0.25rem; min-width: 0; }
.gl-cont__cap { font-family: var(--font-display); color: var(--navy); font-size: 1.05rem; line-height: 1.3; overflow-wrap: anywhere; }
.gl-cont__meta { font-size: 0.85rem; color: var(--muted); overflow-wrap: anywhere; }
.gl-cont__bar { display: block; height: 8px; border-radius: 999px; background: #E6E0D2; overflow: hidden; margin-top: 0.15rem; }
.gl-cont__fill { display: block; height: 100%; width: 0; background: var(--gold); border-radius: 999px; transition: width 0.4s ease; }
.gl-cont__stats { font: 600 0.85rem var(--font-ui); color: var(--navy); }
.gl-cont__row .gl-vote { box-shadow: none; }
.gl-cont__empty { margin: 0.8rem 0 0; color: var(--muted); font-style: italic; display: none; }
.gl-cont__empty.is-on { display: block; }
.gl-cont__noscript { color: var(--muted); }
.gl-empty--contest { background: transparent; border: 0; padding: 0.4rem 0; }
@media (max-width: 899px) { .gl-cont { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 620px) {
  .gl-contest { padding: 0.9rem 0.8rem 1rem; }
  .gl-cont__row { grid-template-columns: 5.5rem minmax(0, 1fr); gap: 0.6rem; }
  .gl-cont__row .gl-vote { grid-column: 1 / -1; width: 100%; }
}

/* Winner banner */
.gl-win { margin-top: 1.4rem; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 0; background: var(--navy-deep); color: #FFFCF7; border: 2px solid var(--gold); border-radius: var(--radius); overflow: hidden; box-shadow: 0 10px 28px rgba(11, 61, 92, 0.22); }
.gl-win__media { display: block; aspect-ratio: 3 / 2; background: var(--navy); overflow: hidden; border: 0; border-radius: 0; box-shadow: none; }
.gl-win__media:hover { box-shadow: none; }
.gl-win__media picture, .gl-win__media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gl-win__body { display: flex; flex-direction: column; justify-content: center; gap: 0.5rem; padding: 1.4rem 1.6rem; }
.gl-win__kicker { margin: 0; display: inline-flex; align-items: center; gap: 0.4rem; color: #E0C45A; font: 700 0.8rem var(--font-ui); letter-spacing: 0.1em; text-transform: uppercase; }
.gl-win__title { margin: 0; font-family: var(--font-display); font-size: clamp(1.4rem, 2.6vw, 2.1rem); line-height: 1.15; color: #FFFCF7; }
.gl-win__cap { margin: 0; font-family: var(--font-display); font-size: 1.25rem; color: #E0C45A; }
.gl-win__credit, .gl-win__votes { margin: 0; color: rgba(255, 252, 247, 0.88); }
.gl-win__votes strong { color: #FFFCF7; font-size: 1.15em; }
.gl-win__tap { margin: 0.2rem 0 0; font-size: 0.88rem; color: rgba(255, 252, 247, 0.7); }
@media (max-width: 899px) { .gl-win { grid-template-columns: minmax(0, 1fr); } .gl-win__body { padding: 1rem 1.1rem 1.2rem; } }

/* Past winners strip */
.gl-pw-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; }
.gl-pw-list > li { flex: 0 0 calc((100% - 3 * 1rem) / 4); max-width: calc((100% - 3 * 1rem) / 4); min-width: 0; display: flex; }
.gl-pw { display: flex; flex-direction: column; gap: 0.15rem; width: 100%; padding: 0.5rem; }
.gl-pw__img { display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 8px; background: var(--navy-deep); }
.gl-pw__img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gl-pw__month { font: 700 0.78rem var(--font-ui); letter-spacing: 0.06em; text-transform: uppercase; color: var(--gold-text); margin-top: 0.35rem; }
.gl-pw__cap { font-family: var(--font-display); color: var(--navy); font-size: 0.98rem; line-height: 1.25; overflow-wrap: anywhere; }
.gl-pw__votes { font-size: 0.82rem; color: var(--muted); }
.gl-badge--win { background: var(--navy); color: #E0C45A; }
@media (max-width: 1199px) { .gl-pw-list > li { flex-basis: calc((100% - 2 * 1rem) / 3); max-width: calc((100% - 2 * 1rem) / 3); } }
@media (max-width: 620px) { .gl-pw-list { gap: 0.65rem; } .gl-pw-list > li { flex-basis: calc((100% - 0.65rem) / 2); max-width: calc((100% - 0.65rem) / 2); } }
