/* The 72 Club gallery — isolated component stylesheet.
   Intentionally uses only #tv-gallery-hub so legacy #photos/site styles cannot override it. */
#tv-gallery-hub.tv-gallery-hub {
  --tgh-bg: #061426;
  --tgh-panel: #0b213b;
  --tgh-panel-2: #102e50;
  --tgh-line: rgba(139, 190, 236, 0.2);
  --tgh-text: #f4f8ff;
  --tgh-muted: #a8bfd9;
  --tgh-cyan: #70e4f5;
  --tgh-orange: #ff8057;
  display: block !important;
  position: relative !important;
  box-sizing: border-box !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  margin: 0 !important;
  padding: clamp(16px, 3vw, 36px) clamp(12px, 3.5vw, 44px) !important;
  overflow: visible !important;
  background:
    radial-gradient(ellipse at 0 0, rgba(24, 105, 199, 0.2), transparent 32rem),
    linear-gradient(160deg, #0c3d78 0%, #0a3470 50%, #082754 100%) !important;
  color: var(--tgh-text);
  isolation: isolate;
}
#tv-gallery-hub.tv-gallery-hub::before,
#tv-gallery-hub.tv-gallery-hub::after {
  content: none !important;
  display: none !important;
}
#tv-gallery-hub .tv-gallery-hub__shell {
  display: block !important;
  position: relative !important;
  box-sizing: border-box !important;
  width: min(100%, 1480px) !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  margin: 0 auto !important;
  padding: clamp(14px, 2.4vw, 30px) !important;
  border: 1px solid var(--tgh-line);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(14, 62, 119, 0.94), rgba(7, 34, 67, 0.98));
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
}
#tv-gallery-hub .tv-gallery-hub__header {
  display: flex !important;
  position: static !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: wrap !important;
  gap: 16px;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 0 20px !important;
  padding: 0 0 18px !important;
  border-bottom: 1px solid var(--tgh-line);
}
#tv-gallery-hub .tv-gallery-hub__eyebrow {
  display: block;
  color: var(--tgh-cyan);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.18em;
}
#tv-gallery-hub #tv-gallery-hub-title {
  margin: 8px 0 !important;
  color: var(--tgh-text) !important;
  font-size: clamp(28px, 4vw, 46px) !important;
  font-weight: 950 !important;
  line-height: 1.04 !important;
  letter-spacing: -0.045em !important;
}
#tv-gallery-hub #tv-gallery-hub-title em {
  color: var(--tgh-orange) !important;
  font-style: normal;
}
#tv-gallery-hub .tv-gallery-hub__title-wrap p {
  margin: 0 !important;
  color: var(--tgh-muted) !important;
  font-size: 12px !important;
  line-height: 1.6 !important;
}
#tv-gallery-hub #tv-gallery-hub-updated {
  display: inline-flex !important;
  align-items: center;
  width: fit-content !important;
  max-width: 100% !important;
  height: auto !important;
  padding: 8px 12px !important;
  border: 1px solid rgba(112, 228, 245, 0.25);
  border-radius: 999px;
  background: rgba(3, 18, 37, 0.34);
  color: var(--tgh-text);
  font-size: 11px;
  line-height: 1.5;
}
#tv-gallery-hub #tv-gallery-grid {
  display: block !important;
  position: static !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
  transform: none !important;
}
#tv-gallery-hub .tv-gallery-toolbar {
  display: grid !important;
  position: static !important;
  grid-template-columns: minmax(180px, 0.85fr) minmax(0, 2fr) !important;
  grid-template-rows: auto !important;
  grid-auto-rows: min-content !important;
  align-items: end !important;
  align-content: start !important;
  gap: 16px !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  margin: 0 0 16px !important;
  padding: 15px !important;
  border: 1px solid var(--tgh-line);
  border-radius: 15px;
  background: rgba(3, 18, 37, 0.68);
  overflow: visible !important;
  transform: none !important;
  contain: none !important;
}
#tv-gallery-hub .tv-gallery-toolbar-copy {
  display: flex !important;
  position: static !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
  gap: 5px !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}
#tv-gallery-hub .tv-gallery-toolbar-copy .eyebrow {
  color: var(--tgh-cyan);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.15em;
}
#tv-gallery-hub .tv-gallery-toolbar-copy strong {
  color: var(--tgh-text);
  font-size: 16px;
  line-height: 1.3;
}
#tv-gallery-hub .tv-gallery-toolbar-copy small,
#tv-gallery-hub .tv-gallery-sort-note {
  color: var(--tgh-muted);
  font-size: 11px;
  line-height: 1.55;
}
#tv-gallery-hub .tv-gallery-filters {
  display: grid !important;
  position: static !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto !important;
  grid-template-rows: auto !important;
  align-items: end !important;
  align-content: start !important;
  gap: 9px !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}
#tv-gallery-hub .tv-gallery-filters label {
  display: flex !important;
  position: static !important;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  margin: 0;
  padding: 0;
}
#tv-gallery-hub .tv-gallery-filters label > span {
  color: var(--tgh-muted);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.1em;
}
#tv-gallery-hub .tv-gallery-filters select,
#tv-gallery-hub .tv-gallery-clear,
#tv-gallery-hub .tv-gallery-more {
  box-sizing: border-box !important;
  width: 100%;
  min-width: 0;
  min-height: 42px;
  border: 1px solid rgba(139, 190, 236, 0.23);
  border-radius: 10px;
  background: #0b1c30;
  color: var(--tgh-text);
  font: inherit;
  font-size: 12px;
}
#tv-gallery-hub .tv-gallery-filters select {
  padding: 0 9px;
}
#tv-gallery-hub .tv-gallery-clear {
  padding: 0 12px;
  cursor: pointer;
}
#tv-gallery-hub .tv-gallery-clear:disabled {
  opacity: 0.42;
  cursor: default;
}
#tv-gallery-hub .tv-album-grid {
  display: grid !important;
  position: static !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  grid-auto-rows: auto !important;
  align-content: start !important;
  gap: 14px !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 !important;
  transform: none !important;
}
#tv-gallery-hub .tv-album-card {
  display: flex !important;
  position: relative !important;
  flex-direction: column !important;
  align-self: start !important;
  width: 100% !important;
  min-width: 0 !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 1px solid rgba(139, 190, 236, 0.28);
  border-radius: 14px;
  background: linear-gradient(180deg, #123866, #0a2343);
  color: var(--tgh-text);
  text-align: left;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}
#tv-gallery-hub .tv-album-cover {
  display: block !important;
  position: relative !important;
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: #0b1d31;
}
#tv-gallery-hub .tv-album-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
}
#tv-gallery-hub .tv-album-cover::after {
  content: "";
  position: absolute;
  inset: 35% 0 0;
  background: linear-gradient(transparent, rgba(2, 9, 18, 0.78));
  pointer-events: none;
}
#tv-gallery-hub .tv-album-count,
#tv-gallery-hub .tv-album-open {
  position: absolute !important;
  z-index: 1;
  color: #fff;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.05em;
}
#tv-gallery-hub .tv-album-count {
  top: 9px;
  left: 9px;
  padding: 6px 8px;
  border-radius: 999px;
  background: rgba(3, 12, 23, 0.78);
}
#tv-gallery-hub .tv-album-open {
  right: 10px;
  bottom: 10px;
}
#tv-gallery-hub .tv-album-info {
  display: flex !important;
  flex-direction: column;
  gap: 6px;
  padding: 12px;
}
#tv-gallery-hub .tv-album-info strong {
  display: -webkit-box;
  overflow: hidden;
  color: var(--tgh-text);
  font-size: 13px;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
#tv-gallery-hub .tv-album-info small {
  color: var(--tgh-muted);
  font-size: 10px;
  line-height: 1.45;
}
#tv-gallery-hub .tv-gallery-more-wrap {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 22px 0 4px;
}
#tv-gallery-hub .tv-gallery-more-wrap p,
#tv-gallery-hub .tv-gallery-end-note {
  margin: 14px 0 0;
  color: var(--tgh-muted);
  text-align: center;
  font-size: 11px;
}
#tv-gallery-hub .tv-gallery-more {
  width: auto;
  padding: 0 20px;
  border-color: rgba(112, 228, 245, 0.36);
  background: #0d3b67;
  font-weight: 850;
  cursor: pointer;
}
#tv-gallery-hub .tv-gallery-hub__footer {
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid var(--tgh-line);
  color: #8eaccb;
  text-align: center;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.14em;
}
#tv-gallery-hub .tv-gallery-hub__footer span {
  color: var(--tgh-orange);
}
#tv-gallery-hub .tv-gallery-hub__loading {
  margin: 0;
  padding: 24px;
  color: var(--tgh-muted);
  text-align: center;
}
#tv-gallery-hub .tv-album-detail {
  display: block !important;
  position: static !important;
  height: auto !important;
  min-height: 0 !important;
}
#tv-gallery-hub .tv-album-hero {
  display: block !important;
  position: relative !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 0 18px !important;
  padding: 14px !important;
  border: 1px solid var(--tgh-line);
  border-radius: 14px;
  background: rgba(3, 18, 37, 0.5);
}
#tv-gallery-hub .tv-album-back {
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--tgh-line);
  border-radius: 9px;
  background: #102f50;
  color: var(--tgh-text);
  cursor: pointer;
}
#tv-gallery-hub .tv-album-hero h2 {
  margin: 14px 0 7px;
  color: var(--tgh-text);
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1.2;
}
#tv-gallery-hub .tv-album-hero p {
  margin: 0;
  color: var(--tgh-muted);
  font-size: 12px;
}
#tv-gallery-hub .tv-album-photo-grid {
  display: grid !important;
  position: static !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 12px !important;
  height: auto !important;
  min-height: 0 !important;
}
#tv-gallery-hub .tv-album-photo {
  display: block !important;
  position: relative !important;
  width: 100%;
  aspect-ratio: 3/4;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--tgh-line);
  border-radius: 11px;
  background: #081a2d;
  cursor: pointer;
}
#tv-gallery-hub .tv-album-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
#tv-gallery-hub .tv-photo-date {
  position: absolute;
  left: 7px;
  right: 7px;
  bottom: 7px;
  color: white;
  font-size: 9px;
  text-align: left;
  text-shadow: 0 1px 5px #000;
}
#tv-gallery-hub .tv-photo-source-fallback {
  display: grid;
  place-items: center;
  min-height: 100px;
  width: 100%;
  color: var(--tgh-muted);
  background: #091b30;
  font-size: 11px;
}
#tv-gallery-hub .tv-photo-open-icon {
  position: absolute;
  top: 8px;
  right: 8px;
  color: white;
}
@media (min-width: 1100px) {
  #tv-gallery-hub .tv-album-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  }
}
@media (max-width: 900px) {
  #tv-gallery-hub .tv-gallery-toolbar {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  #tv-gallery-hub .tv-album-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
  #tv-gallery-hub .tv-album-photo-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}
@media (max-width: 600px) {
  #tv-gallery-hub.tv-gallery-hub {
    padding: 12px 9px !important;
  }
  #tv-gallery-hub .tv-gallery-hub__shell {
    padding: 12px !important;
    border-radius: 16px;
  }
  #tv-gallery-hub .tv-gallery-hub__header {
    align-items: flex-start !important;
    gap: 10px;
    margin-bottom: 14px !important;
    padding-bottom: 14px !important;
  }
  #tv-gallery-hub #tv-gallery-hub-title {
    font-size: 27px !important;
  }
  #tv-gallery-hub .tv-gallery-toolbar {
    gap: 12px !important;
    margin-bottom: 12px !important;
    padding: 11px !important;
  }
  #tv-gallery-hub .tv-gallery-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 9px !important;
  }
  #tv-gallery-hub .tv-album-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 9px !important;
  }
  #tv-gallery-hub .tv-album-cover {
    aspect-ratio: 3/4;
  }
  #tv-gallery-hub .tv-album-info {
    padding: 9px;
  }
  #tv-gallery-hub .tv-album-info strong {
    font-size: 12px;
  }
  #tv-gallery-hub .tv-album-photo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }
}
@media (max-width: 360px) {
  #tv-gallery-hub .tv-album-grid,
  #tv-gallery-hub .tv-album-photo-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  #tv-gallery-hub * {
    scroll-behavior: auto !important;
  }
}

/* Prevent global semantic footer rules from leaking into this component. */
#tv-gallery-hub .tv-gallery-hub__footer {
  display: block !important;
  position: static !important;
  box-sizing: border-box !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  margin: 20px 0 0 !important;
  padding: 14px 0 0 !important;
  border-top: 1px solid var(--tgh-line) !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #8eaccb !important;
  text-align: center !important;
  font-size: 9px !important;
  font-weight: 850 !important;
  letter-spacing: 0.14em !important;
  line-height: 1.5 !important;
}
#tv-gallery-hub .tv-gallery-hub__footer::before,
#tv-gallery-hub .tv-gallery-hub__footer::after {
  content: none !important;
  display: none !important;
}
#tv-gallery-hub .tv-gallery-hub__footer span {
  display: inline !important;
  color: var(--tgh-orange) !important;
}

/* Admin: explicit per-album date control */
.album-date-field {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 11px;
}
.album-date-field input[type="date"] {
  width: min(100%, 190px);
  min-height: 36px;
  padding: 7px 9px;
  border: 1px solid rgba(112, 228, 245, 0.25);
  border-radius: 8px;
  background: #0b1c30;
  color: var(--text, #f4f8ff);
  color-scheme: dark;
}
@media (max-width: 760px) {
  .album-date-field input[type="date"] {
    width: 100%;
  }
}

/* Auto-managed album grid: fill available width, grow/shrink with album count. */
#tv-gallery-hub #tv-gallery-grid > .tv-album-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 245px), 1fr)) !important;
  grid-auto-flow: row !important;
  grid-auto-rows: auto !important;
  align-items: stretch !important;
  align-content: start !important;
  justify-content: stretch !important;
  gap: clamp(10px, 1.2vw, 16px) !important;
  width: 100% !important;
}
#tv-gallery-hub #tv-gallery-grid > .tv-album-grid > .tv-album-card {
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  height: 100% !important;
  align-self: stretch !important;
}
#tv-gallery-hub #tv-gallery-grid .tv-album-cover {
  width: 100% !important;
  aspect-ratio: 4 / 3 !important;
  height: auto !important;
  flex: 0 0 auto !important;
}
#tv-gallery-hub #tv-gallery-grid .tv-album-cover img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}
#tv-gallery-hub #tv-gallery-grid .tv-album-info {
  flex: 1 0 auto !important;
}
#tv-gallery-hub #tv-gallery-grid .tv-album-photo-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)) !important;
  grid-auto-flow: row !important;
  grid-auto-rows: auto !important;
  align-content: start !important;
  gap: clamp(8px, 1vw, 14px) !important;
  width: 100% !important;
}
#tv-gallery-hub #tv-gallery-grid .tv-album-photo {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 3 / 4 !important;
}
@media (min-width: 1200px) {
  #tv-gallery-hub #tv-gallery-grid > .tv-album-grid {
    grid-template-columns: repeat(auto-fit, minmax(245px, 1fr)) !important;
  }
}
@media (max-width: 760px) {
  #tv-gallery-hub #tv-gallery-grid > .tv-album-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 155px), 1fr)) !important;
    gap: 10px !important;
  }
  #tv-gallery-hub #tv-gallery-grid .tv-album-cover {
    aspect-ratio: 3 / 4 !important;
  }
  #tv-gallery-hub #tv-gallery-grid .tv-album-photo-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 135px), 1fr)) !important;
    gap: 8px !important;
  }
}
@media (max-width: 360px) {
  #tv-gallery-hub #tv-gallery-grid > .tv-album-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}
