/* ============================================================================
   JNVKAA Photo Gallery (docs/specs/gallery.md f). Loaded by gallery pages in every layout.
   Mobile first. Album cards are the shared tile (.pg-card.pg-tile from console.css: same radius,
   padding, 16:9 media and meta row as the event and story cards); the album grid adds columns
   1 > 2 > 3 > 4 > 5 as the screen grows. The photo grid is square and row-major (DOM order =
   visual order = keyboard order) and fills wide screens with more, not bigger, tiles.
   Blur-up LQIP without inline styles, visible focus rings, reduced motion respected.
   ========================================================================== */
:root {
  --gx-gap: 3px;
  --gx-radius: 10px;
  --gx-ok: #10794f;
  --gx-warn: #a15c00;
  --gx-bad: #b3261e;
  --gx-focus: 0 0 0 3px #fff, 0 0 0 6px var(--teal-700);
}

/* Component display rules must never override the hidden attribute (uploader status, toolbar buttons). */
.gx-up [hidden], .gx-toolbar [hidden], .gx-btn-row [hidden], .gx-mgr [hidden], [data-gx-slideshow][hidden] { display: none !important; }
.gx-small { font-size: var(--fs-sm); }
.gx-h3 { font-size: var(--fs-md); margin: var(--sp-5) 0 var(--sp-2); }

/* ---- page rhythm: public pages sit close under the band, like the member page body ---------------- */
.section.section-fluid.gx-page { padding-block: var(--sp-6) var(--sp-8); }
@media (min-width: 1024px) { .section.section-fluid.gx-page { padding-block: var(--sp-8) 3rem; } }
.gx-back { margin: var(--sp-6) 0 0; }

/* ---- focus: every interactive gallery control gets a clear ring ---------------------------- */
.gx-tile:focus-visible, .gx-card-link:focus-visible, .gx-chip:focus-visible, .gx-tab:focus-visible,
.gx-menu summary:focus-visible, .gx-icon-btn:focus-visible, .gx-sel input:focus-visible + span,
.gx-callout:focus-visible, .gx-panel-sum:focus-visible {
  outline: 3px solid var(--teal-700); outline-offset: 2px; box-shadow: var(--gx-focus); border-radius: 6px;
}
.gx-card-link:focus-visible { border-radius: var(--card-radius); }

/* ---- filters: type chips (scroll on phones) + year / batch selects ---------------------------- */
.gx-filters { display: flex; flex-direction: column; gap: var(--sp-3); margin: 0 0 var(--sp-5); }
.gx-chips { display: flex; gap: 6px; overflow-x: auto; scroll-snap-type: x proximity; padding: 2px; margin: -2px;
  -webkit-overflow-scrolling: touch; scrollbar-width: none; min-width: 0; }
.gx-chips::-webkit-scrollbar { display: none; }
.gx-chip { flex: 0 0 auto; scroll-snap-align: start; display: inline-flex; align-items: center; min-height: var(--ctl-h-sm); padding: 0 12px;
  border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink); font-family: var(--font-body);
  font-weight: 500; font-size: var(--fs-sm); white-space: nowrap; transition: border-color .15s, color .15s, background .15s; }
.gx-chip:hover { border-color: var(--teal-300); color: var(--teal-700); }
.gx-chip.is-on { background: var(--teal); border-color: var(--teal); color: #fff; font-weight: 600; }
.gx-selects { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; }
.gx-select { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); font-weight: 600; color: var(--muted); }
.gx-select > span { text-transform: uppercase; letter-spacing: .06em; font-size: var(--fs-2xs); }
.gx-select select, .gx-select input { min-height: var(--ctl-h-sm); padding: 0 2rem 0 .75rem; border: 1px solid var(--line-strong); border-radius: 999px;
  background-color: #fff; font: inherit; font-size: var(--fs-sm); font-weight: 500; color: var(--ink); min-width: 8.5rem; }
@media (pointer: coarse) { .gx-chip, .gx-select select { min-height: 40px; } }
@media (max-width: 767px) {
  .gx-selects { flex-wrap: nowrap; }
  .gx-select { flex: 1 1 0; min-width: 0; }
  .gx-select select { flex: 1 1 auto; min-width: 0; width: 100%; }
}
@media (min-width: 768px) {
  .gx-filters { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; }
  .gx-chips { flex-wrap: wrap; overflow: visible; }
}

/* ---- tabs ---------------------------------------------------------------------------------- */
.gx-tabs { display: flex; gap: .3rem; overflow-x: auto; border-bottom: 1px solid var(--line); margin: 0 0 1.2rem; -webkit-overflow-scrolling: touch; }
.gx-tab { flex: 0 0 auto; display: inline-flex; align-items: center; gap: .45rem; min-height: 48px; padding: 0 .9rem; color: var(--muted);
  font-family: var(--font-head); font-weight: 600; border-bottom: 3px solid transparent; white-space: nowrap; }
.gx-tab:hover { color: var(--teal-700); }
.gx-tab.is-on { color: var(--teal-700); border-bottom-color: var(--teal); }
.gx-tab-badge { display: inline-grid; place-items: center; min-width: 1.4rem; height: 1.4rem; padding: 0 .35rem; border-radius: 100px;
  background: var(--gx-warn); color: #fff; font-size: .75rem; }
.pg-tab-count.is-alert { background: #d6455d; color: #fff; }
/* the visually hidden label inside a tab count must not escape the scrolling tab row (page-wide overflow on phones) */
.pg-tab-count { position: relative; }

.gx-callout { display: flex; gap: var(--sp-3); align-items: center; padding: var(--sp-3) var(--sp-4); border-radius: var(--card-radius);
  background: var(--cream); border: 1px solid #f6dcc8; color: var(--ink); margin: 0 0 var(--sp-4); min-height: 44px; font-size: var(--fs-sm);
  transition: border-color .15s, box-shadow .15s; }
.gx-callout:hover { color: var(--ink); border-color: var(--teal-300); box-shadow: 0 8px 20px -14px rgba(0, 29, 35, .4); }
.gx-callout > i:first-child { color: var(--teal-700); font-size: 1.1rem; }
.gx-callout__go { margin-left: auto; color: var(--teal-700); font-size: .8rem; }
.gx-hint { color: var(--muted); font-size: var(--fs-sm); display: flex; gap: var(--sp-2); align-items: baseline; }
.gx-banner { background: #eef7f7; border: 1px solid #cbe6e7; color: var(--ink-2); display: flex; gap: .6rem; }
.gx-allclear { margin: 0; color: var(--gx-ok); font-size: var(--fs-sm); font-weight: 600; }

/* ---- album grid: 1 > 2 > 3 > 4 > 5 columns ------------------------------------------------------- */
.gx-albums { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-4); }
@media (min-width: 560px) { .gx-albums { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 960px) { .gx-albums { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .gx-albums { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-5); } }
@media (min-width: 1600px) { .gx-albums { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
/* legacy grid name (other pages may still use it) */
.gx-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-4); }
@media (min-width: 560px) { .gx-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 960px) { .gx-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---- album card (extras on top of .pg-card.pg-tile) ---------------------------------------------- */
.gx-card { min-width: 0; display: flex; }
.gx-card-link { flex: 1 1 auto; color: var(--ink); text-decoration: none; }
.gx-card-link:hover { color: var(--ink); }
.gx-card-link:hover .gx-card-title { color: var(--teal-700); }
.gx-card-media { background: var(--sand); }
.gx-card-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.gx-card-empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--teal-700); font-size: 1.8rem;
  background: linear-gradient(135deg, var(--cream), #ffe3cf); opacity: .8; }
.gx-count { position: absolute; right: var(--sp-2); bottom: var(--sp-2); display: inline-flex; gap: 6px; align-items: center; padding: 3px 9px;
  border-radius: 999px; background: rgba(0, 29, 35, .78); color: #fff; font-size: var(--fs-2xs); font-weight: 600; font-variant-numeric: tabular-nums;
  backdrop-filter: blur(4px); }
.gx-card-flag { position: absolute; left: var(--sp-2); top: var(--sp-2); display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px;
  border-radius: 999px; background: rgba(255, 255, 255, .95); color: var(--ink-2); font-size: var(--fs-2xs); font-weight: 600;
  box-shadow: 0 2px 8px -2px rgba(0, 29, 35, .35); }
.gx-card-flag i { color: var(--teal-700); }
.gx-card-body { gap: 6px; padding: var(--sp-3) var(--sp-4) var(--sp-4); }
.gx-card-kicker { font-size: var(--fs-2xs); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--teal-700); }
.gx-card-title { transition: color .15s; }
.gx-card-meta { font-size: var(--fs-xs); }
.gx-card-place { min-width: 0; }
.gx-card-place > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gx-card-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.gx-vis { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: var(--fs-2xs);
  font-family: var(--font-body); font-weight: 600; background: var(--paper); color: var(--ink-2); border: 1px solid var(--line); white-space: nowrap; }
.gx-vis-public { background: #e8f6ef; color: var(--gx-ok); border-color: #b7e4cd; }
.gx-vis-batch { background: #eef1ff; color: #3245a8; border-color: #d3daf7; }
.gx-vis-draft { background: #fff4e5; color: var(--gx-warn); border-color: #f5d9ad; }
.gx-row { margin-bottom: var(--sp-6); }
.gx-row-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: .7rem; }
.gx-row-head h2 { font-size: var(--fs-lg); margin: 0; }
.gx-row-head a { display: inline-flex; align-items: center; min-height: 32px; font-weight: 600; font-size: var(--fs-sm); }

/* ---- blur-up: LQIP behind, real image fades in (class set by gallery-view.js) ------------- */
.gx-ph { filter: blur(12px); transform: scale(1.1); }
/* Without JS images simply show; gallery-view.js adds html.gx-js and marks each image .is-loaded on load. */
.gx-img { transition: opacity .25s ease; }
.gx-js .gx-img:not(.is-loaded) { opacity: 0; }
.gx-tile .gx-ph, .gx-tile .gx-img, .gx-mthumb .gx-ph, .gx-mthumb .gx-img, .gx-card-media .gx-ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ---- photo grid: square tiles that fill the width (3 on phones, ~10 on a 1920 screen) ------------- */
.gx-grid { --gx-tile: 104px; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gx-gap); }
@media (min-width: 600px) { .gx-grid, .container-fluid .gx-grid { --gx-gap: 6px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); } }
@media (min-width: 1024px) { .gx-grid, .container-fluid .gx-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); } }
@media (min-width: 1536px) { .gx-grid, .container-fluid .gx-grid { --gx-gap: 8px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); } }
.gx-cell { min-width: 0; }
.gx-tile { position: relative; display: block; aspect-ratio: 1; overflow: hidden; background: var(--sand); border-radius: 4px; cursor: zoom-in; -webkit-tap-highlight-color: transparent; }
@media (min-width: 600px) { .gx-tile { border-radius: 8px; } }
.gx-tile:not([data-pswp-src]) { cursor: pointer; }
.gx-tile::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(0, 29, 35, .06); pointer-events: none; }
@media (hover: hover) {
  .gx-tile .gx-img { transition: opacity .25s ease, transform .4s cubic-bezier(.2, .8, .2, 1); }
  .gx-tile:hover .gx-img { transform: scale(1.05); }
}
.gx-badge { position: absolute; left: 4px; top: 4px; padding: 2px 7px; border-radius: 6px; font-size: var(--fs-2xs); font-weight: 700;
  background: rgba(0, 29, 35, .82); color: #fff; }
.gx-badge-pending { background: var(--gx-warn); }
.gx-badge-rejected { background: var(--gx-bad); }
.gx-tile-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 1.2rem .5rem .4rem; font-size: var(--fs-2xs); color: #fff;
  background: linear-gradient(transparent, rgba(0, 0, 0, .72)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gx-note { margin: 4px 0 0; font-size: var(--fs-xs); color: var(--gx-bad); }
.gx-more { text-align: center; margin: var(--sp-6) 0 0; }

/* ---- states -------------------------------------------------------------------------------- */
.gx-state { text-align: center; padding: var(--sp-8) var(--sp-4); color: var(--muted); background: #fff; border: 1px dashed var(--line-strong); border-radius: var(--card-radius); }
.gx-state > i { font-size: 1.75rem; color: var(--teal); }
.gx-state h2, .gx-state h3 { font-size: var(--fs-md); margin: var(--sp-3) 0 var(--sp-1); color: var(--ink); }
.gx-state p { font-size: var(--fs-sm); margin: 0 auto var(--sp-3); max-width: 48ch; }
.gx-teaser { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3) var(--sp-4); margin-top: var(--sp-8); padding: var(--sp-4) var(--sp-5);
  border-radius: var(--card-radius); background: var(--cream); border: 1px solid #f6dcc8; }
.gx-teaser__ico { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: #fff; color: var(--teal-700); flex: 0 0 40px; }
.gx-teaser h2 { font-size: var(--fs-md); margin: 0 0 2px; }
.gx-teaser p { margin: 0; color: var(--ink-2); font-size: var(--fs-sm); }
.gx-teaser > div { flex: 1 1 260px; min-width: 0; }

/* ---- album header: facts in the page band (public .pagehead and member .pg-head.is-banner) ------ */
.gx-title-row { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .8rem; }
.gx-title-row .page-title { margin-bottom: 0; }
.gx-album-head { display: flex; flex-direction: column; gap: 1rem; margin: .8rem 0 1.2rem; }
@media (min-width: 900px) { .gx-album-head { flex-direction: row; justify-content: space-between; align-items: flex-start; } }
.gx-meta-list { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-6); margin: 0; }
.gx-meta-list div { display: flex; flex-direction: column; min-width: 0; }
.gx-meta-list dt { font-size: var(--fs-2xs); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 700; }
.gx-meta-list dd { margin: 0; font-weight: 600; font-size: var(--fs-sm); }
.gx-desc { max-width: 70ch; color: var(--ink-2); margin: var(--sp-3) 0 0; font-size: var(--fs-sm); }
.pagehead.gx-albumhead .gx-meta-list { margin-top: var(--sp-3); }
.pagehead.gx-albumhead .gx-meta-list dt { color: rgba(255, 255, 255, .6); }
.pagehead.gx-albumhead .gx-meta-list dd { color: #fff; }
.pagehead.gx-albumhead .gx-meta-list a, .pagehead.gx-albumhead .gx-desc a { color: #9af4f8; }
.pagehead.gx-albumhead .gx-desc { color: rgba(255, 255, 255, .82); }
.pagehead.gx-albumhead h1, .pagehead.gx-photohead h1 { max-width: 30ch; text-wrap: balance; }
.gx-albumbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-2) var(--sp-4); margin: 0 0 var(--sp-4); }
.gx-albumbar__hint { margin: 0; font-size: var(--fs-sm); color: var(--muted); }
.gx-albumbar .share-row { margin: 0; }
.gx-toolbar { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; margin: 0 0 var(--sp-4); }
.gx-btn-row { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; }
.gx-btn-row form { margin: 0; }

/* ---- photo page -------------------------------------------------------------------------- */
.gx-photo { margin: 0; }
.gx-photo-frame { position: relative; overflow: hidden; border-radius: var(--gx-radius); background: #0b1215; display: grid; place-items: center; }
.gx-photo-frame .gx-ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.gx-photo-frame .gx-img { position: relative; width: 100%; height: auto; max-height: 78vh; object-fit: contain; }
.gx-photo-cap { display: flex; flex-direction: column; gap: 2px; padding: var(--sp-3) 2px; }
.gx-photo-caption { font-size: var(--fs-md); font-weight: 600; color: var(--ink); }
.gx-photo-sub { color: var(--muted); font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.gx-photo-nav { display: grid; grid-template-columns: 1fr auto 1fr; gap: var(--sp-2); align-items: center; margin: 0 0 var(--sp-4); }
.gx-photo-nav a[rel="next"] { justify-self: end; }
.gx-photo-nav .btn { padding-inline: .8rem; }
@media (max-width: 420px) { .gx-photo-nav .btn { font-size: var(--fs-sm); padding-inline: .6rem; } }
.gx-photo-share { margin-top: var(--sp-2); }
.gx-photo-wrap { max-width: min(100%, 1400px); }
.gx-photo-layout { display: grid; gap: var(--sp-5); }
@media (min-width: 1100px) { .gx-photo-layout { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; } .gx-photo-side { position: sticky; top: calc(var(--mnav-h, 64px) + var(--sp-4)); } }
@media (min-width: 1536px) { .gx-photo-layout { grid-template-columns: minmax(0, 1fr) 380px; } }
.gx-photo-side .gx-toolbar { margin-bottom: var(--sp-3); }
.gx-photo-side .gx-toolbar form { margin: 0; }
.gx-side-sec { background: #fff; border: 1px solid var(--line); border-radius: var(--card-radius); padding: var(--sp-4); margin-bottom: var(--sp-3); font-size: var(--fs-base); }
.gx-side-sec h2 { font-size: var(--fs-md); margin: 0 0 var(--sp-3); }
.gx-side-sec p { margin: 0 0 var(--sp-2); }
.gx-tag-list, .gx-comments { list-style: none; margin: 0 0 var(--sp-3); padding: 0; display: flex; flex-direction: column; gap: 4px; }
.gx-tag-list li { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); }
.gx-tag-list form { margin: 0; }
.gx-icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--paper); color: var(--ink); cursor: pointer; }
@media (pointer: coarse) { .gx-icon-btn { width: 44px; height: 44px; } }
.gx-icon-btn:hover { background: var(--cream); color: var(--teal-700); }
.gx-details { margin-top: var(--sp-2); }
.gx-details summary { cursor: pointer; min-height: 36px; display: flex; align-items: center; gap: 6px; font-weight: 600; color: var(--teal-700); font-size: var(--fs-sm); }
.gx-inline-form { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0; }
.gx-inline-form input { flex: 1 1 10rem; min-width: 0; }
.gx-fieldset { border: 0; padding: 0; margin: 0 0 var(--sp-3); }
.gx-fieldset legend { font-family: var(--font-head); font-weight: 600; margin-bottom: 6px; }
.gx-check { display: flex; gap: var(--sp-2); align-items: flex-start; min-height: 36px; padding: 6px 0; cursor: pointer; font-size: var(--fs-base); line-height: 1.45; }
.gx-check input, .gx-radio input { width: 18px; height: 18px; margin-top: 1px; accent-color: var(--teal-700); flex: 0 0 auto; }
.gx-radio { display: flex; gap: var(--sp-3); align-items: flex-start; padding: var(--sp-2) 2px; cursor: pointer; }
.gx-radio > span { display: flex; flex-direction: column; gap: 2px; }
.gx-com-head { margin: 0; font-size: var(--fs-sm); }
.gx-com-body { margin: 2px 0 0; white-space: pre-line; }
.gx-comments li { padding: var(--sp-2) 0; border-bottom: 1px solid var(--line); }
.gx-comments li.is-hidden { opacity: .6; }
.gx-com-actions { display: flex; gap: 4px; }
.gx-com-actions form { margin: 0; }
.gx-com-form { display: flex; flex-direction: column; gap: var(--sp-2); align-items: flex-start; }
.gx-com-form textarea, .gx-side-sec textarea { width: 100%; }
.gx-count-inline { margin-left: 2px; font-size: var(--fs-xs); opacity: .85; font-variant-numeric: tabular-nums; }
.gx-quote { margin: .4rem 0; padding: .4rem .8rem; border-left: 3px solid var(--teal-300); color: var(--ink-2); background: var(--paper); }

/* ---- lists (my uploads, tags, trash, reports) -------------------------------------------- */
.gx-mine { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: .8rem; }
@media (min-width: 760px) { .gx-mine { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .gx-mine { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1760px) { .gx-mine { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.pg-main .gx-mine { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 760px) { .pg-main .gx-mine { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1760px) { .pg-main .gx-mine { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.gx-mine-body > .badge { align-self: flex-start; }
.gx-mine-item, .gx-report { display: flex; gap: .9rem; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: .7rem; }
.gx-mine-thumb { position: relative; flex: 0 0 96px; width: 96px; height: 96px; border-radius: 8px; overflow: hidden; background: var(--sand); display: block; }
.gx-mine-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gx-mine-thumb.gx-card-empty { display: grid; place-items: center; font-size: 1.6rem; }
.gx-mine-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .35rem; }
.gx-mine-body p { margin: 0; }
.gx-mine-album { font-weight: 600; }
.gx-reports { list-style: none; margin: 0; padding: 0; }
.gx-report-body { flex: 1; min-width: 0; }
.gx-report-body p { margin: 0 0 .3rem; }
.gx-resolve { display: flex; flex-direction: column; gap: .4rem; margin-top: .5rem; }
.gx-resolve input { min-height: 44px; padding: .4rem .7rem; border: 1px solid var(--line); border-radius: 10px; font: inherit; }

/* ---- editor ------------------------------------------------------------------------------ */
.gx-editor-panel > summary { list-style: none; cursor: pointer; }
.gx-editor-panel > summary::-webkit-details-marker { display: none; }
.gx-panel-sum { display: flex; align-items: center; min-height: 44px; }
.gx-panel-sum h2 { font-size: 1.15rem; margin: 0; }
.gx-panel-sum::after { content: "\f078"; font-family: "Font Awesome 6 Free"; font-weight: 900; margin-left: auto; color: var(--muted); }
.gx-editor-panel[open] > .gx-panel-sum::after { content: "\f077"; }
.gx-editor { margin-top: 1rem; }
.gx-form-grid { display: grid; grid-template-columns: 1fr; gap: 0 1rem; }
@media (min-width: 760px) { .gx-form-grid { grid-template-columns: 1fr 1fr; } .gx-span-2 { grid-column: span 2; } }
.gx-editor .field input, .gx-editor .field select, .gx-editor .field textarea { min-height: 44px; }
.gx-vis-pick { margin-top: .4rem; }
.gx-narrow { max-width: 22rem; }
.field-error { color: var(--gx-bad); font-size: .85rem; }
.gx-danger { color: var(--gx-bad) !important; }
.gx-danger-zone { border-color: #f3d3cf; }


/* ---- uploader: two clear steps (confirm, then choose) ----------------------------------------- */
.gx-up { margin-top: 0; }
.gx-drop { display: flex; flex-direction: column; align-items: center; gap: var(--sp-3); text-align: center; padding: var(--sp-6) var(--sp-4); border: 2px dashed #b9dcdd;
  border-radius: var(--card-radius); background: #f5fbfb; transition: background .2s ease, border-color .2s ease; }
@media (min-width: 768px) { .gx-drop { padding: var(--sp-8) var(--sp-6); } }
.gx-drop.is-over { background: var(--cream); border-color: var(--teal); }
.gx-drop-ico { font-size: 1.8rem; color: var(--teal); }
.gx-drop-title { margin: 0; font-size: var(--fs-md); }
.gx-drop-hint { margin: 0; color: var(--muted); font-size: var(--fs-sm); }
.gx-drop-hint i { color: var(--teal); }
.gx-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-3); width: 100%; max-width: 36rem; text-align: left; }
.gx-step { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: var(--sp-3); align-items: start; padding: var(--sp-3) var(--sp-4);
  background: #fff; border: 1px solid var(--line); border-radius: var(--card-radius); }
.gx-step-n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--teal); color: #fff;
  font-family: var(--font-head); font-weight: 700; font-size: var(--fs-sm); margin-top: 3px; }
.gx-step-body { display: grid; gap: var(--sp-2); justify-items: start; }
.gx-step:has([data-gx-consent]:checked) { border-color: #b7e4cd; }
.gx-step:has([data-gx-consent]:checked) .gx-step-n { background: var(--gx-ok); }
.gx-pick { position: relative; overflow: hidden; justify-content: center; cursor: pointer; min-width: 12rem; }
.gx-pick:focus-within { box-shadow: var(--gx-focus); }
.gx-file { position: absolute; inset: 0; opacity: 0; cursor: pointer; font-size: 0; }
.gx-desk { display: none; }
@media (hover: hover) and (pointer: fine) { .gx-desk { display: inline; } }
.gx-consent { margin: 0; padding: 0; font-size: var(--fs-sm); color: var(--ink-2); }
.gx-consent.is-error { color: var(--gx-bad); }
.gx-consent.is-error input { outline: 2px solid var(--gx-bad); outline-offset: 2px; }
.gx-step:has(.gx-consent.is-error) { border-color: #f3c3be; background: #fff8f7; }
.gx-up-status { display: flex; flex-direction: column; gap: var(--sp-2); margin: var(--sp-4) 0 var(--sp-3); }
@media (min-width: 760px) { .gx-up-status { flex-direction: row; align-items: center; justify-content: space-between; } }
.gx-up-overall { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.gx-up-total-label { font-weight: 600; font-size: var(--fs-base); }
.gx-up-overall progress, .gx-up-row progress, .gx-budget { width: 100%; height: 8px; accent-color: var(--teal); }
.gx-up-actions { display: flex; gap: var(--sp-2); }
.gx-up-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-2); }
@media (min-width: 1024px) { .gx-up-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1600px) { .gx-up-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.gx-up-row { display: grid; grid-template-columns: 56px 1fr auto; gap: var(--sp-3); align-items: center; padding: var(--sp-2); background: #fff;
  border: 1px solid var(--line); border-radius: var(--card-radius); min-width: 0; }
.gx-up-row img, .gx-up-thumb { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; background: var(--sand); display: block; }
.gx-up-info { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.gx-up-name { font-size: var(--fs-sm); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gx-up-msg { font-size: var(--fs-xs); color: var(--muted); }
.gx-up-row.is-error { border-color: #f3c3be; background: #fff8f7; }
.gx-up-row.is-error .gx-up-msg { color: var(--gx-bad); }
.gx-up-row.is-done .gx-up-msg { color: var(--gx-ok); }
.gx-up-cap { display: flex; gap: 4px; margin-top: 2px; }
.gx-up-cap input { flex: 1; min-width: 0; min-height: var(--ctl-h-sm); font-size: var(--fs-sm); }
.gx-up-done { text-align: center; padding: var(--sp-6) var(--sp-4); margin-top: var(--sp-4); border-radius: var(--card-radius); background: #e8f6ef; border: 1px solid #b7e4cd; }
.gx-up-done > i { font-size: 1.8rem; color: var(--gx-ok); }
.gx-up-done .btn { margin: 4px; }

/* ---- photo manager ---------------------------------------------------------------------- */
.gx-mgrid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem; }
@media (min-width: 620px) { .gx-mgrid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 960px) { .gx-mgrid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1280px) { .gx-mgrid { grid-template-columns: repeat(5, 1fr); } }
.gx-mtile { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 10px; min-width: 0; }
.gx-mtile.is-selected { outline: 3px solid var(--teal); outline-offset: -1px; }
.gx-mtile.sortable-ghost { opacity: .4; }
.gx-mtile.sortable-chosen { box-shadow: var(--shadow); }
.gx-mthumb { position: relative; aspect-ratio: 1; overflow: hidden; border-radius: 10px 10px 0 0; background: var(--sand); }
.gx-st-hidden .gx-mthumb, .gx-st-rejected .gx-mthumb { opacity: .55; }
.gx-sel { position: absolute; left: 0; top: 0; width: 48px; height: 48px; display: grid; place-items: center; cursor: pointer; }
.gx-sel input { width: 24px; height: 24px; accent-color: var(--teal-700); cursor: pointer; }
.gx-js .gx-mgr:not(.is-selecting) .gx-sel:not(.gx-sel-on) { display: none; }
.gx-handle { position: absolute; right: 0; top: 0; width: 44px; height: 44px; display: grid; place-items: center; color: #fff;
  background: rgba(0, 29, 35, .55); border-bottom-left-radius: 10px; cursor: grab; touch-action: none; }
.gx-handle { display: none; }
.gx-js .gx-mgr:not(.is-selecting) .gx-handle { display: grid; }
.gx-mbadges { position: absolute; left: .35rem; bottom: .35rem; display: flex; flex-wrap: wrap; gap: .25rem; }
.gx-mfoot { display: flex; align-items: center; gap: .4rem; padding: .25rem .25rem .25rem .55rem; min-height: 48px; }
.gx-mfoot-col { flex-direction: column; align-items: flex-start; padding: .5rem .6rem; gap: .15rem; }
.gx-mpos { font-family: var(--font-head); font-weight: 700; color: var(--muted); font-size: .8rem; min-width: 1.4rem; }
.gx-mcap { flex: 1; min-width: 0; font-size: .8rem; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gx-menu { position: static; }
.gx-menu summary { list-style: none; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; cursor: pointer; color: var(--ink); }
.gx-menu summary::-webkit-details-marker { display: none; }
.gx-menu summary:hover { background: var(--paper); }
.gx-menu-panel { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% - 4px); background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow); padding: .7rem; display: flex; flex-direction: column; gap: .5rem; min-width: 15rem; }
@media (min-width: 620px) { .gx-menu-panel { left: auto; width: 18rem; } }
.gx-move { display: grid; grid-template-columns: 1fr 1fr; gap: .3rem; }
.gx-move form { margin: 0; }
.gx-move .btn { width: 100%; min-height: 44px; font-size: .8rem; padding: .3rem .4rem; }
.gx-edit .field { margin-bottom: .5rem; }
.gx-edit input { width: 100%; min-height: 40px; }
.gx-bulkbar { position: sticky; bottom: 0; z-index: 30; display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin: 1rem -1.2rem -1.2rem;
  padding: .7rem 1rem calc(.7rem + env(safe-area-inset-bottom)); background: var(--ink); color: #fff; border-radius: 0 0 var(--radius) var(--radius); }
.gx-js .gx-mgr .gx-bulkbar:not(.is-on) { display: none; }
.gx-bulkbar .btn { min-height: 44px; }
.gx-bulkbar .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .3); }
.gx-bulkbar .btn-ghost:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.gx-bulkbar .gx-danger { color: #ffb4ab !important; }
.gx-bulkbar select, .gx-bulkbar input:not([type=checkbox]) { min-height: 44px; border-radius: 10px; border: 0; padding: .3rem .6rem; font: inherit; max-width: 12rem; }
.gx-bulk-count { flex: 1 1 100%; font-weight: 600; font-size: .9rem; }
@media (min-width: 900px) { .gx-bulk-count { flex: 0 1 auto; margin-right: auto; } }
.gx-bulk-move { display: inline-flex; gap: .3rem; }
.gx-all { color: #fff; }
#gx-modform .gx-bulkbar { position: sticky; margin: 1rem 0 0; border-radius: var(--radius); }

/* ---- event strip ------------------------------------------------------------------------ */
.gx-strip { margin: 2rem 0; }
.gx-strip-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
@media (min-width: 760px) { .gx-strip-list { grid-template-columns: repeat(8, 1fr); } }

/* ---- PhotoSwipe custom UI (registered in gallery-view.js) ------------------------------- */
.pswp { --pswp-bg: #061014; --pswp-placeholder-bg: #0e1d22; }
.pswp__button { min-width: 50px; min-height: 60px; }
.pswp__button--gx { display: grid; place-items: center; color: #fff; font-size: 1.15rem; background: none; border: 0; cursor: pointer; opacity: .85; }
.pswp__button--gx:hover, .pswp__button--gx:focus-visible { opacity: 1; }
.pswp__button--gx[aria-pressed="true"] { color: #ff6b81; }
.pswp__button--gx:focus-visible, .pswp__button:focus-visible { outline: 3px solid #fff; outline-offset: -6px; border-radius: 10px; }
.gx-pswp-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 2.4rem 1rem calc(1rem + env(safe-area-inset-bottom));
  color: #fff; background: linear-gradient(transparent, rgba(0, 0, 0, .82)); font-size: .95rem; line-height: 1.45; pointer-events: none; }
.gx-pswp-cap a, .gx-pswp-cap button { pointer-events: auto; }
.gx-pswp-cap .gx-cap-text { font-weight: 600; }
.gx-pswp-cap .gx-cap-sub { opacity: .85; font-size: .85rem; }
.gx-pswp-cap .gx-cap-people { margin-top: .2rem; font-size: .85rem; }
.gx-pswp-cap .gx-cap-actions { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .5rem; }
.gx-pswp-cap .gx-cap-actions a, .gx-pswp-cap .gx-cap-actions button { display: inline-flex; align-items: center; gap: .35rem; min-height: 40px; padding: 0 .8rem;
  border-radius: 100px; background: rgba(255, 255, 255, .14); color: #fff; border: 0; font: inherit; font-size: .85rem; cursor: pointer; }
.gx-pswp-cap .gx-cap-actions a:hover, .gx-pswp-cap .gx-cap-actions button:hover { background: rgba(255, 255, 255, .26); }
.gx-pswp-toast { position: absolute; left: 50%; top: 70px; transform: translateX(-50%); padding: .5rem 1rem; border-radius: 100px; background: rgba(255, 255, 255, .92);
  color: var(--ink); font-size: .9rem; pointer-events: none; }

/* ---- share row inside the portal (public.css styles it on the public site) -------------- */
.portal-body .share-row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: 0 0 1rem; }
.portal-body .share-status { margin: 0; font-size: .85rem; color: var(--muted); }

/* ---- admin / batch-admin gallery consoles (layout from console.css) ------------------- */
.gx-total { font-size: var(--fs-sm); color: var(--muted); }
.gx-albumgrid { list-style: none; margin: 0; padding: 0; }
.pg-card-media > .gx-tilevis { position: absolute; top: var(--sp-2); left: var(--sp-2); background: rgba(255, 255, 255, .94); box-shadow: 0 1px 3px rgba(0, 0, 0, .15); font-family: var(--font-body); font-size: var(--fs-xs); padding: .15rem .55rem; }
.gx-checkpill { white-space: nowrap; display: flex; align-items: center; gap: var(--sp-2); min-height: var(--ctl-h); padding: 0 .7rem; border: 1px solid var(--line-strong); border-radius: var(--ctl-radius); background: #fff; font-size: var(--fs-base); cursor: pointer; }
.pg-field > label.gx-checkpill { text-transform: none; letter-spacing: 0; font-size: var(--fs-base); font-weight: 500; color: var(--ink); }
.gx-fieldlabel { font-size: var(--fs-xs); font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.gx-checkpill input { width: 16px; height: 16px; accent-color: var(--teal); margin: 0; }
.gx-headmeta { color: var(--muted); margin-left: var(--sp-2); }
.pg-sub .gx-vis { font-family: var(--font-body); font-size: var(--fs-xs); padding: .1rem .55rem; }
.panel-head h2 .pg-tab-count { font-family: var(--font-body); font-weight: 600; }


/* ---- member pages: member.css carries older per-feature sizes; the shared tile values win here ---- */
.member-layout .gx-card-link { border-radius: var(--card-radius); }
.member-layout .gx-filters { margin-bottom: var(--sp-5); }
.member-layout .gx-chip.is-on { background: var(--teal); border-color: var(--teal); }
.member-layout .gx-mine-item { border-radius: var(--card-radius); }
.member-layout .pg-head.is-banner .gx-vis { background: rgba(255, 255, 255, .12); color: #e6fbfc; border-color: rgba(255, 255, 255, .25); }
.member-layout .pg-head.is-banner .gx-vis i { color: #9af4f8; }
.member-layout .pg-head.is-banner .pg-actions.gx-toolbar { margin: 0; }
.member-layout .m-album-bar { margin-bottom: var(--sp-4); }

/* ---- reduced motion: no fades, no hover zoom ------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .gx-img, .gx-tile .gx-img, .gx-drop, .gx-chip, .gx-callout, .gx-card-title { transition: none !important; }
  .gx-tile:hover .gx-img { transform: none !important; }
}
