/* Home page + live section styles (index.php), moved verbatim from its <style>
   block; the embed (/live/embed.php) uses the gallery parts. The hero photo
   (month-dependent) stays inline in index.php. */
*, *::before, *::after { box-sizing: border-box; }

:root {
  --nav-h: 56px;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-feature-settings: 'cv02','cv03','cv04','cv11';
  background: #111;
  color: #fff;
  overflow-x: hidden;
}

/* ── Nav ─────────────────────────────────────────────── */
.txb-nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1030;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  background: rgba(10,10,10,0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.txb-nav-brand {
  text-decoration: none;
  display: flex;
  align-items: center;
}
.txb-nav-brand img { display: block; height: 28px; width: auto; }
.txb-nav-right {
  display: flex;
  align-items: center;
  gap: 0.15rem;
}
.txb-nav-link {
  padding: 0.35rem 0.7rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  background: none;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}
.txb-nav-link:hover, .txb-nav-link.active {
  color: #fff;
  background: rgba(255,255,255,0.08);
}
.txb-nav-btn {
  margin-left: 0.4rem;
  padding: 0.3rem 0.9rem;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.85);
  background: rgba(255,255,255,0.06);
  text-decoration: none;
  transition: all 0.15s;
  cursor: pointer;
}
.txb-nav-btn:hover { background: rgba(255,255,255,0.14); color: #fff; }
.txb-hamburger {
  display: none;
  background: none;
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  padding: 0.3rem 0.55rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
}
@media (max-width: 700px) {
  .txb-nav-right { display: none; position: absolute; top: var(--nav-h); left: 0; right: 0; flex-direction: column; align-items: flex-start; background: rgba(10,10,10,0.97); padding: 0.75rem 1rem; border-bottom: 1px solid rgba(255,255,255,0.1); gap: 0.1rem; }
  .txb-nav-right.open { display: flex; }
  .txb-nav-link, .txb-nav-btn { width: 100%; text-align: left; }
  .txb-hamburger { display: block; }
}

/* ── Hero ────────────────────────────────────────────── */
.txb-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-color: #111;
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  z-index: 0;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    175deg,
    rgba(0,0,0,0.45) 0%,
    rgba(0,0,0,0.7) 45%,
    rgba(0,0,0,0.92) 100%
  );
  z-index: 1;
}
.hero-content {
  position: relative;
  z-index: 2;
  padding: 5rem 1.5rem 3rem;
  max-width: 780px;
  width: 100%;
}
.hero-eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--txb-red);
  margin-bottom: 1.1rem;
}
.hero-brand {
  margin-bottom: 1.1rem;
}
.hero-brand img {
  width: min(420px, 75vw);
  height: auto;
  display: block;
  margin: 0 auto;
}
.hero-tagline {
  font-size: clamp(0.85rem, 2.2vw, 1.05rem);
  font-weight: 400;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 2.75rem;
}
.hero-cta {
  display: flex;
  gap: 0.65rem;
  justify-content: center;
  flex-wrap: wrap;
}
.btn-hero-primary {
  padding: 0.65rem 1.6rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 4px;
  background: var(--txb-red);
  color: #fff;
  border: 1px solid var(--txb-red);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
}
.btn-hero-primary:hover { background: #7d0505; border-color: #7d0505; color: #fff; transform: translateY(-1px); box-shadow: 0 4px 24px rgba(161,6,6,0.5); }
.btn-hero-ghost {
  padding: 0.65rem 1.4rem;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 4px;
  background: rgba(255,255,255,0.07);
  color: rgba(255,255,255,0.82);
  border: 1px solid rgba(255,255,255,0.18);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, transform 0.15s;
}
.btn-hero-ghost:hover { background: rgba(255,255,255,0.14); color: #fff; transform: translateY(-1px); }
.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  color: rgba(255,255,255,0.25);
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  animation: float 2.5s ease-in-out infinite;
  cursor: default;
}
.hero-scroll span { display: block; margin-top: 0.4rem; font-size: 1rem; }
@keyframes float {
  0%, 100% { opacity: 0.25; transform: translateX(-50%) translateY(0); }
  50% { opacity: 0.5; transform: translateX(-50%) translateY(6px); }
}

/* ── Features section ───────────────────────────────── */
.txb-features {
  background: #0d0d0d;
  border-top: 1px solid rgba(255,255,255,0.05);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.feature-card {
  padding: 2rem 1.5rem;
  border: 1px solid #1e1e1e;
  border-radius: 6px;
  background: #141414;
  height: 100%;
  transition: border-color 0.2s, transform 0.2s;
  position: relative;
  overflow: hidden;
}
.feature-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--txb-red);
  opacity: 0.25;
  transition: opacity 0.2s;
}
.feature-card:hover { border-color: #333; transform: translateY(-2px); }
.feature-card:hover::before { opacity: 1; }
.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  margin-bottom: 1.25rem;
  color: var(--txb-red);
  background: rgba(161,6,6,0.10);
  border-radius: 8px;
  padding: 0.55rem;
}
.feature-icon svg { width: 100%; height: 100%; stroke-width: 1.75; }
.feature-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}
.feature-desc {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.58);
  line-height: 1.6;
  margin-bottom: 1.25rem;
}
.feature-link {
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color 0.15s;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}
.feature-link:hover { color: #fff; }
.feature-link::after { content: ' →'; }

/* ── Home footer ─────────────────────────────────────── */
.txb-home-footer-full {
  background: #0a0a0a;
  border-top: 1px solid rgba(255,255,255,0.05);
  padding: 1.75rem 1.5rem;
}
.home-footer-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.25rem 1.25rem; }
.home-footer-link { font-size: 0.78rem; color: #666; text-decoration: none; transition: color 0.15s; letter-spacing: 0.02em; }
.home-footer-link:hover { color: #666; }

/* ── Live blog section ───────────────────────────────── */
.txb-live-wrap {
  position: relative;
  padding-top: var(--nav-h);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #0d0d0d;
}
.live-bar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1.1rem;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  background: #111;
  color: #eceef2;
  flex-shrink: 0;
  transition: background 0.6s ease, border-color 0.6s ease;
}
.live-bar-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--txb-red);
  animation: pulse-red 1.8s infinite;
  flex-shrink: 0;
}
.live-bar-dot.archived {
  background: #555;
  animation: none;
}
@keyframes pulse-red {
  0%   { box-shadow: 0 0 0 0 rgba(204,0,0,0.5); }
  70%  { box-shadow: 0 0 0 6px rgba(204,0,0,0); }
  100% { box-shadow: 0 0 0 0 rgba(204,0,0,0); }
}
.live-bar-title { font-size: 0.9rem; font-weight: 600; flex: 1; }

/* ── Event mode — active only while a genuinely live blog is showing
   (see $lbIsLiveNow in PHP). Three coordinated pieces: a sweep across the
   fixed nav's top edge, an ambient glow behind the live bar, and a warmer
   live-bar background. All purely additive — zero layout shift. ────── */
.txb-nav::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--txb-red) 20%, #e8928d 50%, var(--txb-red) 80%, transparent);
  background-size: 200% 100%;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}
body.txb-event-live .txb-nav::before {
  opacity: 1;
  animation: txb-event-sweep 2.6s linear infinite;
}
@keyframes txb-event-sweep { to { background-position: -200% 0; } }

.txb-nav-live-dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #e8928d;
  margin-left: 2px;
  vertical-align: middle;
  animation: pulse-red 1.8s infinite;
  position: relative;
  top: -1px;
}

.txb-live-wrap::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 320px;
  background: radial-gradient(ellipse 70% 100% at 50% 0%, rgba(161,6,6,0.16), transparent 70%);
  opacity: 0;
  transition: opacity 0.8s ease;
  pointer-events: none;
  z-index: 0;
}
body.txb-event-live .txb-live-wrap::before { opacity: 1; }
body.txb-event-live .live-bar {
  background: linear-gradient(180deg, rgba(161,6,6,0.14), rgba(17,17,17,0) 100%), #111;
  border-bottom-color: rgba(161,6,6,0.35);
}

@media (prefers-reduced-motion: reduce) {
  body.txb-event-live .txb-nav::before { animation: none; }
  .live-bar-dot, .txb-nav-live-dot { animation: none; }
}
.live-grid {
  display: grid;
  grid-template-columns: minmax(280px, 38%) 1fr;
  gap: 0;
  flex: 1;
}
.live-col {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(255,255,255,0.06);
}
.live-col:last-child { border-right: none; }
.live-col-inner {
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1;
  padding: 1.1rem;
  min-height: 400px;
  max-height: calc(100vh - var(--nav-h) - 48px);
  color: rgba(255,255,255,0.82);
}
.live-col-inner p, .live-col-inner li, .live-col-inner span,
.live-col-inner h1, .live-col-inner h2, .live-col-inner h3,
.live-col-inner h4, .live-col-inner h5, .live-col-inner h6 {
  color: rgba(255,255,255,0.82) !important;
}
.live-col-inner a { color: #d4706a !important; }
.live-col-inner a:hover { color: #e8928d !important; }

/* Native live-blog posts, polls, key moments, scoreboard: /inc/liveblog_feed.css */

.lb-static-header { text-align: center; margin-bottom: 1rem; }
.live-col-inner .lb-archived-note { color: #aaa !important; }
.lb-static-header img { max-width: 220px; height: auto; }
.lb-static-header h3 { font-size: 0.95rem; font-weight: 600; margin-top: 0.6rem; color: #ddd; }
/* Predictions widget in live column */
.lb-predict-widget {
  margin-top: 1.25rem;
  border: 1px solid rgba(204,0,0,0.3);
  border-left: 3px solid #cc0000;
  border-radius: 4px;
  background: rgba(204,0,0,0.05);
  padding: 0.65rem 0.85rem 0.75rem;
}
.lb-predict-widget-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #cc0000;
  margin-bottom: 0.45rem;
}
.lb-predict-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.3rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  text-decoration: none;
  color: rgba(255,255,255,0.8) !important;
  font-size: 0.82rem;
  transition: color 0.12s;
}
.lb-predict-link:last-child { border-bottom: none; }
.lb-predict-link:hover { color: #fff !important; }
.lb-predict-link-arrow { color: #cc0000; font-size: 0.75rem; flex-shrink: 0; margin-left: 0.5rem; }
@media (max-width: 767px) {
  .live-grid { grid-template-columns: 1fr; }
  .live-col { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.06); }
  .live-col-inner { max-height: 55vh; }
  /* Native live blog on phones: the page scrolls, not two stacked boxes;
     the event title is already in the live bar */
  .live-grid--native, .live-grid--native-photos { grid-template-columns: 1fr; }
  .live-grid--native .live-col { overflow: visible; }
  .live-grid--native .live-col-inner { max-height: none; min-height: 0; overflow: visible; }
  .live-grid--native .lb-static-header, .live-grid--native .lb-static-header + hr { display: none; }
  .live-grid--native .lb-new-pill { position: fixed; top: calc(var(--nav-h, 56px) + 0.6rem); left: 50%; transform: translateX(-50%); margin: 0; }
}

/* ── Gallery mode layout ────────────────────────────── */
/* One column at every width — the photo grid is the page. */
.live-grid--gallery {
  grid-template-columns: 1fr;
}
.live-grid--gallery .live-col { border-right: none; border-bottom: none; }
@media (min-width: 860px) {
  /* No column cap on desktop: galleryColumnCount() fits as many ~150px columns as the width allows */
}

/* ── Native live blog + guest photo side panel ───────── */
.live-grid--native-photos {
  grid-template-columns: minmax(260px, 28%) 1fr minmax(240px, 26%);
}
@media (max-width: 767px) { .live-grid--native-photos { grid-template-columns: 1fr; } }

/* ── Event strip: staff blurb + prediction links ─────── */
.lb-event-strip {
  padding: 0.5rem 1rem;
  background: #0d0d0d;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  font-size: 0.75rem;
  color: rgba(255,255,255,0.45);
  line-height: 1.55;
  flex-shrink: 0;
}
.lb-event-strip p { margin: 0 0 0.25rem; }
.lb-event-strip p:last-child { margin-bottom: 0; }
.lb-event-strip a { color: #d4706a; }
.lb-predict-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.3rem 0.7rem;
}
.lb-predict-inline-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--txb-red);
}
.lb-predict-inline a {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  border-bottom: 1px dotted rgba(255,255,255,0.2);
}
.lb-predict-inline a:hover { color: #fff; border-bottom-color: rgba(255,255,255,0.6); }

/* ── Live-bar check-in button ─────────────────────────── */
.checkin-livebar-btn {
  background: none;
  border: 1px solid rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.5);
  border-radius: 4px;
  padding: 0.28rem 0.6rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  line-height: 1;
  white-space: nowrap;
}
.checkin-livebar-btn:hover { border-color: rgba(255,255,255,0.4); color: #fff; }
.checkin-livebar-btn.checked-in { border-color: rgba(0,188,140,0.6); color: #00bc8c; background: rgba(0,188,140,0.07); }
.checkin-livebar-btn.muted { border-color: rgba(255,255,255,0.12); color: rgba(255,255,255,0.3); }

/* ── Footer ──────────────────────────────────────────── */
.txb-home-footer {
  text-align: center;
  padding: 1.25rem;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.25);
  border-top: 1px solid rgba(255,255,255,0.05);
  background: #0a0a0a;
}
.txb-home-footer a { color: rgba(255,255,255,0.25); text-decoration: none; }
.txb-home-footer a:hover { color: rgba(255,255,255,0.5); }
/* Room under the text for the floating "Add photo" button on phones */
@media (max-width: 767px) { .txb-home-footer { padding-bottom: calc(5rem + env(safe-area-inset-bottom)); } }

/* ── Modal overrides ─────────────────────────────────── */
.modal-content { background: #1a1a1a; border: 1px solid #333; color: #e8e8e8; }
.modal-header { border-bottom: 1px solid #2a2a2a; }
.modal-footer { border-top: 1px solid #2a2a2a; }

/* ── Theme toggle ────────────────────────────────────── */
.txb-theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 30px;
  padding: 0;
  color: rgba(255,255,255,0.5);
  background: none;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.15s, background 0.15s;
  flex-shrink: 0;
}
.txb-theme-toggle:hover { color: rgba(255,255,255,0.9); background: rgba(255,255,255,0.07); }

/* ── Light mode overrides ────────────────────────────── */
[data-theme="light"] html,
[data-theme="light"] body {
  background: #e9e8e7 !important;
  color: #212529 !important;
}
[data-theme="light"] .txb-nav {
  background: rgba(235,235,233,0.97) !important;
  border-bottom: 1px solid rgba(0,0,0,0.13) !important;
  box-shadow: 0 1px 4px rgba(0,0,0,0.07) !important;
}
[data-theme="light"] .txb-nav-link {
  color: rgba(30,30,30,0.6) !important;
}
[data-theme="light"] .txb-nav-link:hover,
[data-theme="light"] .txb-nav-link.active {
  color: #111 !important;
  background: rgba(0,0,0,0.05);
}
[data-theme="light"] .txb-nav-btn {
  border-color: rgba(0,0,0,0.18) !important;
  color: rgba(0,0,0,0.65) !important;
  background: rgba(0,0,0,0.04) !important;
}
[data-theme="light"] .txb-nav-btn:hover {
  background: rgba(0,0,0,0.09) !important;
  color: #000 !important;
}
[data-theme="light"] .txb-hamburger {
  border-color: rgba(0,0,0,0.2) !important;
  color: #333 !important;
}
@media (max-width: 700px) {
  [data-theme="light"] .txb-nav-right {
    background: rgba(235,235,233,0.97) !important;
    border-bottom-color: rgba(0,0,0,0.1) !important;
  }
}
[data-theme="light"] .txb-theme-toggle { color: rgba(0,0,0,0.45); }
[data-theme="light"] .txb-theme-toggle:hover { color: rgba(0,0,0,0.85); background: rgba(0,0,0,0.05); }
[data-theme="light"] .dropdown-menu { background: rgba(255,255,255,0.97); border-color: rgba(0,0,0,0.1); }
[data-theme="light"] .dropdown-item { color: rgba(0,0,0,0.7); }
[data-theme="light"] .dropdown-item:hover { background: rgba(0,0,0,0.05); color: #000; }
/* Features section */
[data-theme="light"] .txb-features {
  background: #e3e2e1 !important;
  border-color: rgba(0,0,0,0.07) !important;
}
[data-theme="light"] .feature-card {
  background: #ffffff !important;
  border-color: #e0e0e0 !important;
  color: #212529;
  box-shadow: 0 1px 3px rgba(0,0,0,0.07) !important;
}
[data-theme="light"] .feature-card:hover { border-color: #bbb !important; }
[data-theme="light"] .feature-title { color: #111 !important; }
[data-theme="light"] .feature-desc { color: rgba(0,0,0,0.55) !important; }
[data-theme="light"] .feature-link { color: rgba(0,0,0,0.5) !important; }
[data-theme="light"] .feature-link:hover { color: #000 !important; }
/* Home footer */
[data-theme="light"] .txb-home-footer-full {
  background: #d8d7d6 !important;
  border-top-color: rgba(0,0,0,0.07) !important;
}
[data-theme="light"] .home-footer-link { color: #555 !important; }
[data-theme="light"] .home-footer-link:hover { color: #111 !important; }
/* Modals */
[data-theme="light"] .modal-content { background: #fff !important; border-color: #dee2e6 !important; color: #212529 !important; }
[data-theme="light"] .modal-header { border-bottom-color: #dee2e6 !important; }
[data-theme="light"] .modal-footer { border-top-color: #dee2e6 !important; }
[data-theme="light"] ::selection { background: #A10606; color: #fff; }
[data-theme="light"] ::-webkit-scrollbar-track { background: #e3e2e1; }
[data-theme="light"] ::-webkit-scrollbar-thumb { background: #bbb; }
[data-theme="light"] ::-webkit-scrollbar-thumb:hover { background: #999; }
/* nav logo: conditional src handles light/dark, no filter needed */
/* ── Light hero ──────────────────────────────────────── */
[data-theme="light"] .hero-overlay {
  background: linear-gradient(
    175deg,
    rgba(242,241,240,0.80) 0%,
    rgba(238,237,235,0.90) 45%,
    rgba(233,232,231,0.97) 100%
  ) !important;
}
[data-theme="light"] .hero-eyebrow { color: #A10606; }
[data-theme="light"] .hero-tagline { color: rgba(0,0,0,0.48); }
[data-theme="light"] .hero-scroll { color: rgba(0,0,0,0.22); }
/* hero logo: conditional src handles light/dark, no filter needed */
[data-theme="light"] .btn-hero-ghost {
  background: rgba(0,0,0,0.07);
  color: rgba(0,0,0,0.72);
  border-color: rgba(0,0,0,0.18);
}
[data-theme="light"] .btn-hero-ghost:hover {
  background: rgba(0,0,0,0.12);
  color: #000;
}
/* Live section: light-theme rules are in the "Live section — light theme" block at the end of this stylesheet */
/* ── Gallery ─────────────────────────────────────────── */
.gallery-toolbar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 1rem;
  background: #111;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  flex-shrink: 0;
}
.gallery-hashtag { font-size: 0.82rem; font-weight: 600; color: var(--txb-red); }
.gallery-count   { font-size: 0.78rem; color: rgba(255,255,255,0.4); }
.gallery-col-inner { padding: 0.75rem !important; overflow-y: auto; }
/* Masonry in reading order: renderGallery() deals photos across .gallery-col
   columns in turn (newest across the top row), so the newest are never
   stacked down one column while another column starts with older ones */
.gallery-grid { display: flex; align-items: flex-start; gap: 0.6rem; }
.gallery-grid > * { flex: 1 1 0; min-width: 0; }
@keyframes gallery-new-in {
  0%   { opacity: 0; transform: scale(0.93); box-shadow: 0 0 0 0 rgba(0,188,140,0.7); }
  40%  { box-shadow: 0 0 0 6px rgba(0,188,140,0.2); }
  100% { opacity: 1; transform: scale(1);    box-shadow: 0 0 0 0 rgba(0,188,140,0); }
}
.gallery-item {
  break-inside: avoid;
  margin-bottom: 0.6rem;
  background: #111;
  border-radius: 5px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  border: 1px solid rgba(255,255,255,0.06);
}
.gallery-item.gallery-item-new { animation: gallery-new-in 0.6s ease forwards; }
.gallery-item:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,0.5); }
.gallery-item img { width: 100%; height: auto; display: block; }
.gallery-item-meta {
  padding: 0.35rem 0.55rem 0.1rem;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.5);
  line-height: 1.35;
}
.gallery-item-meta strong { color: rgba(255,255,255,0.75); font-weight: 600; }
.gallery-item-meta a { color: #d4706a; text-decoration: none; }
.gallery-item-time { color: rgba(255,255,255,0.28); font-weight: 400; margin-left: 0.3rem; }
.gallery-band-tag {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  color: rgba(255,255,255,0.35);
  background: rgba(255,255,255,0.05);
  border-radius: 3px;
  padding: 0.05rem 0.35rem;
  margin-top: 0.2rem;
  letter-spacing: 0.02em;
}
/* Reaction — a single heart per photo */
.gallery-reactions {
  display: flex;
  padding: 0.3rem 0.5rem 0.4rem;
}
.reaction-btn {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 999px;
  padding: 0.12rem 0.5rem;
  font-size: 0.72rem;
  cursor: pointer;
  color: rgba(255,255,255,0.55);
  transition: all 0.12s;
  line-height: 1.4;
  white-space: nowrap;
}
.reaction-btn:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.2); color: #fff; }
.reaction-btn.my-reaction { background: rgba(204,0,0,0.18); border-color: rgba(204,0,0,0.55); color: #ff6b6b; }
.reaction-btn .r-count { font-size: 0.68rem; margin-left: 0.2rem; opacity: 0.8; }
.gallery-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  padding: 3rem 2rem;
  text-align: center;
}
.gallery-empty-text { font-size: 1.1rem; color: rgba(255,255,255,0.5); font-weight: 500; }
.gallery-empty-sub  { font-size: 0.82rem; color: rgba(255,255,255,0.25); margin-top: 0.4rem; }
/* Lightbox */
#gallery-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.93);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 1rem;
}
#gallery-lightbox.open { display: flex; }
#gallery-lightbox-img-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
}
#gallery-lightbox img { max-width: 100%; max-height: 78vh; object-fit: contain; border-radius: 4px; }
#gallery-lightbox-meta { color: rgba(255,255,255,0.7); font-size: 0.82rem; margin-top: 0.75rem; text-align: center; max-width: 540px; }
#gallery-lightbox-actions { display: flex; gap: 0.75rem; margin-top: 0.6rem; align-items: center; justify-content: center; }
#gallery-lightbox-download {
  color: rgba(255,255,255,0.45); font-size: 0.78rem; text-decoration: none;
  border: 1px solid rgba(255,255,255,0.15); border-radius: 4px; padding: 0.2rem 0.65rem;
  transition: all 0.12s;
}
#gallery-lightbox-download:hover { color: #fff; border-color: rgba(255,255,255,0.4); }
#gallery-lightbox-counter { color: rgba(255,255,255,0.3); font-size: 0.75rem; }
#gallery-lightbox-close {
  position: fixed; top: max(0.75rem, env(safe-area-inset-top)); right: max(0.75rem, env(safe-area-inset-right)); z-index: 3;
  width: 44px; height: 44px; line-height: 40px; padding: 0; text-align: center;
  color: #fff; font-size: 1.9rem; cursor: pointer;
  background: rgba(40,40,40,0.9); border: 1px solid rgba(255,255,255,0.45); border-radius: 50%;
}
#gallery-lightbox-close:hover { color: #fff; }
.gallery-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.08);
  border: none;
  color: rgba(255,255,255,0.6);
  font-size: 1.5rem;
  width: 44px; height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.12s;
  z-index: 1;
  flex-shrink: 0;
}
.gallery-lightbox-nav:hover { background: rgba(255,255,255,0.18); color: #fff; }
#gallery-lightbox-prev { left: -56px; }
#gallery-lightbox-next { right: -56px; }
@media (max-width: 640px) {
  #gallery-lightbox-prev { left: 0.25rem; }
  #gallery-lightbox-next { right: 0.25rem; }
  #gallery-lightbox-img-wrap img { max-height: 65vh; }
}
/* Gallery refresh timestamp */
#gallery-last-refresh {
  font-size: 0.68rem;
  color: rgba(255,255,255,0.2);
  margin-left: 0.35rem;
}


.lightbox-action-btn {
  color: rgba(255,255,255,0.45); font-size: 0.78rem;
  border: 1px solid rgba(255,255,255,0.15); border-radius: 4px;
  padding: 0.2rem 0.65rem; cursor: pointer; background: none;
  transition: all 0.12s; white-space: nowrap;
}
.lightbox-action-btn:hover { color: #fff; border-color: rgba(255,255,255,0.4); }
.lightbox-action-btn.active { color: #e05555; border-color: rgba(204,0,0,0.5); background: rgba(204,0,0,0.1); }

/* ── Infinite scroll sentinel (no button: loads as it nears the screen) ── */
#gallery-load-more-wrap { text-align: center; padding: 1rem 0 0.5rem; min-height: 1px; }
#gallery-load-more-status { color: rgba(255,255,255,0.45); font-size: 0.8rem; }

/* ── Report button ───────────────────────────────── */
#lightbox-report-btn { color: rgba(255,100,100,0.45); border-color: rgba(255,100,100,0.2); }
#lightbox-report-btn:hover { color: #ff6464; border-color: rgba(255,100,100,0.5); background: rgba(255,100,100,0.06); }
#lightbox-report-btn.reported { color: rgba(255,100,100,0.3); border-color: rgba(255,100,100,0.1); cursor: default; }

/* ── Gallery redesign (Sep 2026): photo-first tiles, one clear CTA ── */
.gal-head {
  display: flex; align-items: center; gap: 1rem;
  padding: 1rem 1.1rem 0.9rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.gal-head-text { flex: 1 1 auto; min-width: 0; }
.lb-donate .txb-don { margin: 1.25rem 0 0; }
.lb-donate .txb-don-card { min-height: 0; }
.lb-donate .txb-don-photo { flex-basis: 84px; }
.lb-donate .txb-don-copy { padding: 12px 34px 56px 12px; }
.lb-donate .txb-don-head { font-size: 0.98rem; }
.lb-donate .txb-don-sub { display: none; }
.lb-donate .txb-don-act { position: absolute; right: 12px; bottom: 12px; padding: 0; }
.lb-donate .txb-don-btn { padding: 8px 16px; font-size: 0.85rem; }
/* ── Donate modal ── */
.dn-dialog { max-width: 480px; }
.dn { overflow: hidden; border-radius: 16px !important; }
.dn-hero { position: relative; height: 150px; display: flex; align-items: flex-end;
  background: #111 url(/img/donate/13.jpg) 50% 28%/cover; }
.dn-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.05) 20%, rgba(0,0,0,.78)); }
.dn-hero-text { position: relative; z-index: 1; padding: 0 22px 16px; color: #fff; }
.dn-close { position: absolute; top: 12px; right: 12px; z-index: 2; background-color: rgba(0,0,0,.45); border-radius: 50%; padding: 8px; opacity: 1; }
.dn-kicker { display: block; font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #ff6b62; }
.dn-title { margin: 2px 0 0; font-size: 1.4rem; font-weight: 800; letter-spacing: -.01em; line-height: 1.2; color: #fff; }
.dn-body { padding: 18px 22px 20px; }
.dn-lead { font-size: .95rem; line-height: 1.5; margin: 0 0 14px; }
.dn-uses { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 10px; }
.dn-uses li { display: flex; align-items: center; gap: 12px; font-size: .88rem; line-height: 1.35; color: #a9aeb7; }
.dn-uses li b { display: block; color: #eceef2; font-weight: 700; }
.dn-ico { flex: 0 0 34px; height: 34px; border-radius: 10px; background: rgba(161,6,6,.16); color: #ff6b62; display: flex; align-items: center; justify-content: center; }
.dn-ico svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dn-form { margin: 0; text-align: center; }
.dn-btn { width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 13px 20px; border: 0; border-radius: 999px;
  background: linear-gradient(100deg, #8a0b0b, #c0150f); color: #fff; font-weight: 700; font-size: 1.02rem;
  box-shadow: 0 4px 16px rgba(161,6,6,.4); transition: transform .15s, box-shadow .15s; }
.dn-btn:hover, .dn-btn:focus-visible { transform: translateY(-1px); box-shadow: 0 6px 22px rgba(161,6,6,.55); }
.dn-btn svg { width: 17px; height: 17px; fill: currentColor; }
.dn-note { margin: 10px 0 0; font-size: .78rem; color: #8c929c; }
.dn-foot { padding: 12px 22px; border-top: 1px solid rgba(255,255,255,.08); font-size: .8rem; color: #8c929c; text-align: center; }
.dn-foot a { color: #ff6b62; }
[data-theme="light"] .dn-uses li { color: #5f6675; }
[data-theme="light"] .dn-uses li b { color: #1b1e24; }
[data-theme="light"] .dn-ico { background: rgba(161,6,6,.08); color: #a10606; }
[data-theme="light"] .dn-note, [data-theme="light"] .dn-foot { color: #697080; }
[data-theme="light"] .dn-foot { border-top-color: #e3e5e9; }
[data-theme="light"] .dn-foot a { color: #a10606; }
.dn-hero-thanks { height: 120px; background-image: url(/img/donate/12.jpg); background-position: 45% 30%; }
.dn-thanks { text-align: center; padding-top: 0; }
.dn-heart { width: 64px; height: 64px; margin: -32px auto 10px; position: relative; z-index: 2; border-radius: 50%;
  background: linear-gradient(135deg, #8a0b0b, #d61a12); display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 5px var(--dn-ring, #1a1a1a), 0 6px 18px rgba(161,6,6,.45); animation: dn-beat 1.6s ease-in-out .3s 2; }
.dn-heart svg { width: 30px; height: 30px; fill: #fff; }
@keyframes dn-beat { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.14); } 30% { transform: scale(1); } 45% { transform: scale(1.1); } }
@media (prefers-reduced-motion: reduce) { .dn-heart { animation: none; } }
.dn-thanks .dn-kicker { margin-bottom: 2px; }
.dn-badge { display: flex; align-items: center; gap: 12px; text-align: left; margin: -6px 0 18px; padding: 10px 14px;
  border: 1px solid rgba(255,255,255,.1); border-radius: 12px; background: rgba(255,255,255,.03); color: inherit !important; text-decoration: none !important; }
.dn-badge:hover { border-color: rgba(255,107,98,.5); }
.dn-badge img { flex: 0 0 44px; }
.dn-badge span { font-size: .82rem; color: #8c929c; line-height: 1.3; }
.dn-badge b { display: block; font-size: .92rem; color: #eceef2; }
[data-theme="light"] .dn-badge { border-color: #e3e5e9; background: #f7f8fa; }
[data-theme="light"] .dn-badge b { color: #1b1e24; }
[data-theme="light"] .dn-badge span { color: #697080; }
.dn-thanks-title { font-size: 1.55rem; font-weight: 800; letter-spacing: -.01em; margin: 0 0 10px; overflow-wrap: anywhere; }
.dn-thanks-list { list-style: none; padding: 0; margin: 0 0 18px; font-size: .85rem; color: #8c929c; }
.dn-thanks-list li::before { content: "\2713"; color: #3ecf8e; font-weight: 700; margin-right: 6px; }
[data-theme="light"] .dn { --dn-ring: #fff; }
[data-theme="light"] .dn-thanks-list { color: #697080; }
[data-theme="light"] .dn-thanks-list li::before { color: #0f8a5f; }
.gal-donate { padding: 0 1.1rem; }
.gal-donate .txb-don { margin: 12px 0 4px; }
.gal-head-title { font-size: 1.05rem; font-weight: 700; color: #fff; letter-spacing: -0.01em; }
.gal-count { font-weight: 400; color: rgba(255,255,255,0.4); font-size: 0.85rem; margin-left: 0.35rem; }
.gal-head-sub { font-size: 0.82rem; color: rgba(255,255,255,0.5); margin-top: 0.15rem; line-height: 1.4; }
.gal-head-sub strong { color: #e8928d; font-weight: 600; }
.gal-cta {
  flex: none; display: inline-flex; align-items: center; gap: 0.45rem;
  background: var(--txb-red); color: #fff; border: 0; border-radius: 999px;
  padding: 0.75rem 1.43rem; font-size: 1.08rem; font-weight: 700;
  box-shadow: 0 4px 18px rgba(161,6,6,0.35);
  transition: transform 0.12s, background 0.12s;
}
.gal-cta:hover { background: #c40808; transform: translateY(-1px); }
.gal-cta svg, .gal-fab svg { width: 1.1em; height: 1.1em; }
.gal-fab {
  position: fixed; right: 1rem; bottom: calc(1rem + env(safe-area-inset-bottom));
  z-index: 1040;
  display: none; align-items: center; gap: 0.45rem;
  background: var(--txb-red); color: #fff; border: 0; border-radius: 999px;
  padding: 0.8rem 1.2rem; font-size: 0.95rem; font-weight: 700;
  box-shadow: 0 6px 24px rgba(0,0,0,0.55), 0 2px 10px rgba(161,6,6,0.45);
}
.gal-fab.show { display: inline-flex; animation: gal-fab-in 0.2s ease-out; }
@keyframes gal-fab-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (min-width: 768px) { .gal-fab.show { display: none; } }
.gal-head[hidden] { display: none; }
.gal-filter { display: flex; gap: 0.4rem; margin-top: 0.55rem; flex-wrap: wrap; }
.gal-filter[hidden] { display: none; }
.gal-filter button {
  background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.65);
  border: 1px solid rgba(255,255,255,0.12); border-radius: 999px;
  padding: 0.2rem 0.75rem; font-size: 0.78rem; font-weight: 600; line-height: 1.5;
}
.gal-filter button:hover { color: #fff; border-color: rgba(255,255,255,0.3); }
.gal-filter button.active { background: #fff; color: #111; border-color: #fff; }
.gal-filter .n { font-weight: 400; opacity: 0.6; margin-left: 0.2rem; }
@media (max-width: 575.98px) {
  .gal-head { padding: 0.8rem 0.9rem; }
  .gal-head .gal-cta { padding: 0.62rem 1.15rem; font-size: 1.01rem; }
  .gal-head-title { font-size: 1rem; }
  .gal-head-sub { font-size: 0.76rem; }
  /* Live bar: one line — title truncates, buttons collapse to icons */
  .live-bar { gap: 0.5rem; padding: 0.55rem 0.9rem; }
  .live-bar-title { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .live-bar .lbar-label { display: none; }
  .live-bar .checkin-livebar-btn, .live-bar .lbar-archive { padding: 0.35rem 0.55rem; font-size: 0.85rem; }
  /* Staff blurb: shown in full, just quieter */
  .live-grid--gallery .lb-event-strip { font-size: 0.72rem; padding: 0.55rem 0.9rem; }
}

/* Gallery mode scrolls with the page — no boxed inner scroller */
.live-grid--gallery .gallery-col-inner { max-height: none; overflow: visible; min-height: 0; padding: 0.6rem !important; }
.live-grid--gallery .live-col { overflow: visible; }

/* Tiles: the photo is the tile; name, time and heart ride on a gradient */
.gallery-item { position: relative; border-radius: 10px; border: 0; background: #161616; }
.gallery-item:hover { transform: none; box-shadow: none; }
.gallery-item img { transition: transform 0.35s ease, filter 0.2s; }
.gallery-item:hover img { transform: scale(1.03); filter: brightness(1.08); }
.gal-tile-foot {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; align-items: flex-end; gap: 0.4rem;
  padding: 1.6rem 0.45rem 0.4rem 0.6rem;
  background: linear-gradient(to top, rgba(0,0,0,0.78), rgba(0,0,0,0));
  pointer-events: none;
}
.gal-tile-who { flex: 1 1 auto; min-width: 0; font-size: 0.74rem; line-height: 1.25; color: rgba(255,255,255,0.92); text-shadow: 0 1px 2px rgba(0,0,0,0.6); }
.gal-tile-name { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gal-tile-time { color: rgba(255,255,255,0.6); font-size: 0.68rem; }
/* Light tints of each network's brand color, legible on the tile gradient.
   !important + the .live-col-inner prefix to beat the blanket
   ".live-col-inner span { color: ... !important }" rule above. */
.live-col-inner .gal-tile-name.gal-src-fb { color: #a9c8ff !important; }
.live-col-inner .gal-tile-name.gal-src-ig { color: #f7b0cf !important; }
.gal-src-icon { width: 0.95em; height: 0.95em; margin-right: 0.25em; vertical-align: -0.12em; opacity: 0.7;
  fill: none; stroke: currentColor; stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round; }
.gal-heart {
  pointer-events: auto; flex: none;
  display: inline-flex; align-items: center; gap: 0.25rem;
  background: rgba(0,0,0,0.45); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.18); border-radius: 999px;
  color: #fff; font-size: 0.78rem; font-weight: 600; line-height: 1;
  padding: 0.32rem 0.55rem; min-height: 30px;
  transition: transform 0.12s, background 0.12s, border-color 0.12s;
}
.gal-heart:hover { background: rgba(0,0,0,0.6); }
.gal-heart.my-reaction { background: rgba(204,0,0,0.75); border-color: rgba(255,120,120,0.7); }
.gal-heart.pop { animation: gal-pop 0.3s ease-out; }
@keyframes gal-pop { 50% { transform: scale(1.25); } }
.gal-heart .r-count:empty { display: none; }
/* A heart nobody has tapped yet fades to 40% so liked photos stand out;
   full strength on tile hover or keyboard focus */
.gal-heart.zero, #lightbox-heart-btn.zero { opacity: 0.4; transition: opacity 0.15s; }
.gallery-item:hover .gal-heart.zero, .gal-heart.zero:focus-visible,
#lightbox-heart-btn.zero:hover, #lightbox-heart-btn.zero:focus-visible { opacity: 1; }
/* Supporter reactions (TXB_SUPPORTER_REACTIONS): a read-only tally on the tile,
   buttons in the lightbox for supporters, chips for everyone else */
.gal-extras {
  flex: none; align-self: center; font-size: 0.72rem; font-weight: 600; line-height: 1; white-space: nowrap;
  background: rgba(0,0,0,0.45); border: 1px solid rgba(255,255,255,0.18); border-radius: 999px; padding: 0.3rem 0.5rem;
}
.live-col-inner .gal-tile-foot .gal-extras { color: #fff !important; }
#gallery-lightbox-actions { flex-wrap: wrap; }
#lightbox-extras { display: inline-flex; gap: 0.35rem; }
#lightbox-extras:empty { display: none; }
#lightbox-extras .lb-extra-btn { font-size: 0.9rem; padding: 0.35rem 0.7rem; border-radius: 999px; color: #fff; border-color: rgba(255,255,255,0.3); }
#lightbox-extras .lb-extra-btn.my-reaction { background: rgba(196,30,23,0.75); border-color: rgba(255,120,120,0.7); }
#lightbox-extras .lb-extra-chip { font-size: 0.85rem; color: rgba(255,255,255,0.8); padding: 0.35rem 0.2rem; cursor: help; }

/* Empty state with the CTA right in it */
.gallery-empty { min-height: 0; padding: 3.5rem 1.5rem 3rem; }
.gallery-empty-text { color: #fff; font-size: 1.2rem; font-weight: 700; }
.gallery-empty-sub { color: rgba(255,255,255,0.5); font-size: 0.88rem; max-width: 22rem; margin: 0.35rem auto 1.25rem; }
.gallery-empty .gal-cta { padding: 0.7rem 1.6rem; font-size: 0.95rem; }
.gallery-empty-sub strong { color: #e8928d; }

/* Lightbox: caption block + a real heart button */
#gallery-lightbox-meta { font-size: 0.9rem; line-height: 1.45; }
#gallery-lightbox-meta .lb-cap { display: block; color: rgba(255,255,255,0.85); margin-top: 0.2rem; }
#lightbox-heart-btn { font-size: 0.9rem; padding: 0.35rem 0.9rem; border-radius: 999px; color: #fff; border-color: rgba(255,255,255,0.3); }
#lightbox-heart-btn.my-reaction { background: rgba(204,0,0,0.75); border-color: rgba(255,120,120,0.7); }

/* Contests: the gallery grouped by contest (mode=contests), and one
   contest's own view with its results and links. Text sits in divs, b and
   buttons, not spans, so the blanket .live-col-inner span rule stays out. */
.gal-sec { margin: 0 0 1.5rem; }
.gal-chips { display: flex; gap: 0.4rem; overflow-x: auto; padding: 0 0.1rem 0.6rem; scrollbar-width: none;
  contain: inline-size; min-width: 0; }  /* a long row scrolls; it must not widen the grid */
.gal-chips::-webkit-scrollbar { display: none; }
.gal-chip {
  flex: none; white-space: nowrap; background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.85);
  border: 1px solid rgba(255,255,255,0.14); border-radius: 999px; padding: 0.3rem 0.8rem; font-size: 0.8rem; font-weight: 600;
}
.gal-chip:hover { color: #fff; border-color: rgba(255,255,255,0.35); }
.gal-chip .n { font-weight: 400; opacity: 0.6; margin-left: 0.35rem; }
.gal-sec-head { display: flex; align-items: baseline; gap: 0.25rem 0.6rem; flex-wrap: wrap; margin: 0.15rem 0.1rem 0.55rem; }
.gal-sec-title { background: none; border: 0; padding: 0; color: #fff; font-size: 1.02rem; font-weight: 700; text-align: left; letter-spacing: -0.01em; }
.gal-sec-title:hover { text-decoration: underline; text-underline-offset: 3px; }
.gal-sec-meta { font-size: 0.78rem; color: rgba(255,255,255,0.45); }
.gal-sec-win { font-size: 0.78rem; color: rgba(255,255,255,0.75); }
.gal-sec-more {
  display: block; width: 100%; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.8); border-radius: 10px; padding: 0.55rem; font-size: 0.86rem; font-weight: 600;
}
.gal-sec-more:hover { background: rgba(255,255,255,0.1); color: #fff; }
.gal-contest-card { background: #161616; border: 1px solid rgba(255,255,255,0.08); border-radius: 12px; padding: 0.8rem 0.95rem 0.9rem; margin: 0 0 0.8rem; }
.gal-back { background: none; border: 0; padding: 0; color: rgba(255,255,255,0.55); font-size: 0.8rem; font-weight: 600; }
.gal-back:hover { color: #fff; }
.gal-contest-name { font-size: 1.15rem; font-weight: 700; color: #fff; margin: 0.25rem 0 0.05rem; letter-spacing: -0.01em; }
.gal-contest-sub { font-size: 0.8rem; color: rgba(255,255,255,0.5); }
.gal-contest-links { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-top: 0.65rem; }
.gal-pill, .live-col-inner a.gal-pill {
  display: inline-flex; align-items: center; gap: 0.3rem; border-radius: 999px; padding: 0.28rem 0.8rem;
  font-size: 0.8rem; font-weight: 600; line-height: 1.4; text-decoration: none;
  border: 1px solid rgba(255,255,255,0.16); background: rgba(255,255,255,0.06); color: #fff !important;
}
.gal-pill:hover, .live-col-inner a.gal-pill:hover { background: rgba(255,255,255,0.12); color: #fff !important; }
.gal-results { margin: 0.55rem 0 0; font-size: 0.86rem; }
.gal-results-row { display: flex; gap: 0.5rem; padding: 0.2rem 0; border-top: 1px solid rgba(255,255,255,0.06); }
.gal-results-row[hidden] { display: none; }
.gal-results-row .pl { width: 2.4em; flex: none; color: rgba(255,255,255,0.45); font-variant-numeric: tabular-nums; }
.gal-results-row .nm { color: rgba(255,255,255,0.88); }
.gal-results-toggle { background: none; border: 0; padding: 0.3rem 0 0; color: rgba(255,255,255,0.55); font-size: 0.8rem; font-weight: 600; }
.gal-results-toggle:hover { color: #fff; }
/* Videos: a play mark on the tile, the YouTube player in the lightbox */
.gal-play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -60%); pointer-events: none;
  width: 48px; height: 48px; border-radius: 50%; background: rgba(0,0,0,0.6); border: 2px solid rgba(255,255,255,0.85);
}
.gal-play::after { content: ''; position: absolute; left: 18px; top: 13px; border-style: solid; border-width: 9px 0 9px 15px; border-color: transparent transparent transparent #fff; }
.live-col-inner .gal-tile-name.gal-src-yt { color: #ffb4b4 !important; }
#gallery-lightbox-video { width: min(92vw, 960px); aspect-ratio: 16 / 9; border: 0; border-radius: 8px; background: #000; display: block; }
#gallery-lightbox-meta a.lb-ctx { color: rgba(255,255,255,0.75); text-decoration: underline; text-underline-offset: 2px; }
#gallery-lightbox-share.copied { color: #8fe3b3; border-color: rgba(143,227,179,0.5); }

/* Upload dialog */
.gsub-drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.35rem;
  border: 2px dashed rgba(255,255,255,0.18); border-radius: 14px;
  min-height: 170px; padding: 1rem; margin: 0 0 1rem;
  color: rgba(255,255,255,0.65); cursor: pointer; text-align: center;
  transition: border-color 0.15s, background 0.15s;
  position: relative; overflow: hidden;
}
.gsub-drop:hover, .gsub-drop.dragging { border-color: var(--txb-red); background: rgba(161,6,6,0.06); }
.gsub-drop-icon { font-size: 2rem; }
.gsub-drop-main { font-weight: 700; color: #fff; }
.gsub-drop-sub { font-size: 0.76rem; color: rgba(255,255,255,0.4); }
.gsub-drop img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.gsub-drop.has-file { border-style: solid; border-color: rgba(255,255,255,0.25); }
.gsub-drop-change { position: absolute; right: 0.5rem; bottom: 0.5rem; z-index: 1; background: rgba(0,0,0,0.65); color: #fff; font-size: 0.75rem; font-weight: 600; border-radius: 999px; padding: 0.25rem 0.7rem; }
#gallerySubmitModal .form-control, #gallerySubmitModal .form-select { background: #222; color: #eee; border-color: #3a3a3a; }
#gsub-submit { width: 100%; border-radius: 999px; padding: 0.65rem; font-weight: 700; background: var(--txb-red); border-color: var(--txb-red); }
#gsub-submit:disabled { opacity: 0.45; }

/* ── Live section — light theme ─────────────────────────────────────────
   Everything under #live-section, plus the upload dialog. The full-screen
   photo lightbox stays dark on purpose (photo viewer). Palette: page
   #e9e8e7, surfaces #fff/#f6f6f5, text #1b1e24, muted #5f6675, links #a10606. */
[data-theme="light"] .txb-live-wrap { background: #e9e8e7; }
[data-theme="light"] .live-bar { background: #f6f6f5; color: #1b1e24; border-bottom-color: rgba(0,0,0,0.09); }
[data-theme="light"] body.txb-event-live .live-bar {
  background: linear-gradient(180deg, rgba(161,6,6,0.08), rgba(246,246,245,0) 100%), #f6f6f5;
  border-bottom-color: rgba(161,6,6,0.25);
}
[data-theme="light"] .txb-live-wrap::before { background: radial-gradient(ellipse 70% 100% at 50% 0%, rgba(161,6,6,0.08), transparent 70%); }
[data-theme="light"] .live-bar-dot.archived { background: #9aa0aa; }
[data-theme="light"] .checkin-livebar-btn { border-color: rgba(0,0,0,0.18); color: rgba(0,0,0,0.6); }
[data-theme="light"] .checkin-livebar-btn:hover { border-color: rgba(0,0,0,0.4); color: #000; }
[data-theme="light"] .checkin-livebar-btn.checked-in { border-color: rgba(0,140,100,0.55); color: #0f7a55; background: rgba(0,140,100,0.07); }
[data-theme="light"] .checkin-livebar-btn.muted { border-color: rgba(0,0,0,0.1); color: rgba(0,0,0,0.35); }

/* Columns and staff blurb */
[data-theme="light"] .live-col { border-right-color: rgba(0,0,0,0.08); }
@media (max-width: 767px) { [data-theme="light"] .live-col { border-bottom-color: rgba(0,0,0,0.08); } }
[data-theme="light"] .live-col-inner { color: #2b2f36; }
[data-theme="light"] .live-col-inner p, [data-theme="light"] .live-col-inner li, [data-theme="light"] .live-col-inner span,
[data-theme="light"] .live-col-inner h1, [data-theme="light"] .live-col-inner h2, [data-theme="light"] .live-col-inner h3,
[data-theme="light"] .live-col-inner h4, [data-theme="light"] .live-col-inner h5, [data-theme="light"] .live-col-inner h6 { color: #2b2f36 !important; }
/* ...except text riding on photos (tile name/time, heart count), which stays white */
[data-theme="light"] .live-col-inner .gal-tile-foot span { color: rgba(255,255,255,0.92) !important; }
[data-theme="light"] .live-col-inner .gal-tile-foot .gal-tile-time { color: rgba(255,255,255,0.65) !important; }
[data-theme="light"] .live-col-inner .gal-tile-name.gal-src-fb { color: #a9c8ff !important; }
[data-theme="light"] .live-col-inner .gal-tile-name.gal-src-ig { color: #f7b0cf !important; }
[data-theme="light"] .live-col-inner a { color: #a10606 !important; }
[data-theme="light"] .live-col-inner a:hover { color: #7d0505 !important; }
[data-theme="light"] .lb-static-header img { background: #141518; border-radius: 12px; padding: 10px 14px; }
[data-theme="light"] .lb-static-header h3 { color: #1b1e24; }
[data-theme="light"] .live-col-inner .lb-archived-note { color: #5f6675 !important; }
[data-theme="light"] .lb-predict-widget { background: rgba(161,6,6,0.04); }
[data-theme="light"] .lb-predict-link { color: #2b2f36 !important; border-bottom-color: rgba(0,0,0,0.07); }
[data-theme="light"] .lb-predict-link:hover { color: #000 !important; }
[data-theme="light"] .lb-event-strip { background: #f1f0ef; border-bottom-color: rgba(0,0,0,0.07); color: #5f6675; }
[data-theme="light"] .lb-event-strip a { color: #a10606; }
[data-theme="light"] .lb-predict-inline a { color: #2b2f36; border-bottom-color: rgba(0,0,0,0.25); }
[data-theme="light"] .lb-predict-inline a:hover { color: #000; border-bottom-color: rgba(0,0,0,0.6); }


/* Gallery: header, filters, tiles, empty state, load more, slim donate */
[data-theme="light"] .gal-head { border-bottom-color: rgba(0,0,0,0.08); }
[data-theme="light"] .gal-head-title, [data-theme="light"] .gallery-empty-text { color: #1b1e24; }
[data-theme="light"] .gal-count, [data-theme="light"] .gal-head-sub, [data-theme="light"] .gallery-empty-sub { color: #5f6675; }
[data-theme="light"] .gal-head-sub strong, [data-theme="light"] .gallery-empty-sub strong { color: #a10606; }
[data-theme="light"] .gal-filter button { background: #fff; color: #2b2f36; border-color: rgba(0,0,0,0.14); }
[data-theme="light"] .gal-filter button:hover { color: #000; border-color: rgba(0,0,0,0.35); }
[data-theme="light"] .gal-filter button.active { background: #1b1e24; color: #fff; border-color: #1b1e24; }
[data-theme="light"] .gallery-item { background: #d9d8d6; }
[data-theme="light"] #gallery-load-more-status { color: #5f6675; }
[data-theme="light"] .gal-fab { box-shadow: 0 6px 20px rgba(0,0,0,0.2), 0 2px 10px rgba(161,6,6,0.35); }
[data-theme="light"] .gal-sec-title, [data-theme="light"] .gal-contest-name { color: #1b1e24; }
[data-theme="light"] .gal-chip { background: #fff; color: #2b2f36; border-color: rgba(0,0,0,0.14); }
[data-theme="light"] .gal-chip:hover { color: #000; border-color: rgba(0,0,0,0.35); }
[data-theme="light"] .gal-sec-meta, [data-theme="light"] .gal-contest-sub, [data-theme="light"] .gal-back,
[data-theme="light"] .gal-results-toggle, [data-theme="light"] .gal-results-row .pl { color: #5f6675; }
[data-theme="light"] .gal-sec-win, [data-theme="light"] .gal-results-row .nm { color: #2b2f36; }
[data-theme="light"] .gal-back:hover, [data-theme="light"] .gal-results-toggle:hover { color: #000; }
[data-theme="light"] .gal-sec-more { background: #fff; border-color: rgba(0,0,0,0.12); color: #2b2f36; }
[data-theme="light"] .gal-sec-more:hover { background: #f1f0ee; color: #000; }
[data-theme="light"] .gal-contest-card { background: #fff; border-color: rgba(0,0,0,0.1); }
[data-theme="light"] .gal-results-row { border-top-color: rgba(0,0,0,0.07); }
[data-theme="light"] .gal-pill, [data-theme="light"] .live-col-inner a.gal-pill { background: #fff; border-color: rgba(0,0,0,0.15); color: #1b1e24 !important; }
[data-theme="light"] .gal-pill:hover, [data-theme="light"] .live-col-inner a.gal-pill:hover { background: #f1f0ee; color: #000 !important; }
[data-theme="light"] .live-col-inner .gal-tile-name.gal-src-yt { color: #ffb4b4 !important; }

/* Live section footer */
[data-theme="light"] .txb-home-footer { background: #d8d7d6; border-top-color: rgba(0,0,0,0.07); color: #5f6675; }
[data-theme="light"] .txb-home-footer a { color: #5f6675; }
[data-theme="light"] .txb-home-footer a:hover { color: #1b1e24; }

/* Upload dialog (sits on the light modal) */
[data-theme="light"] .gsub-drop { border-color: rgba(0,0,0,0.2); color: #5f6675; }
[data-theme="light"] .gsub-drop.has-file { border-color: rgba(0,0,0,0.3); }
[data-theme="light"] .gsub-drop-main { color: #1b1e24; }
[data-theme="light"] .gsub-drop-sub { color: #697080; }
[data-theme="light"] #gallerySubmitModal .form-control, [data-theme="light"] #gallerySubmitModal .form-select { background: #fff; color: #1b1e24; border-color: #ced4da; }


/* 24liveblog widget paints a post #F8F8F8 on hover (hard-coded in its script),
   a white block with white text on the dark theme. Keep it a subtle lift. */
:root:not([data-theme="light"]) #LB24 .lb24-liveblog-container .lb24-default-list-item:hover { background-color: rgba(255,255,255,0.06) !important; }
#photos-livebar-count:not(:empty) { margin-left: 0.15rem; opacity: 0.75; }
/* Embedded blog + gallery: the photo grid takes the predictions' place in the left column on desktop (phones keep predictions) */
@media (min-width: 768px) { .has-side-photos .lb-predict-widget { display: none; } }
@media (min-width: 768px) { .live-col-inner:has(> .lb-side-photos:not([hidden])) .lb-predict-widget { display: none; } }
/* Embedded blog's side photos beside the blog: smaller tiles (5 across) */
.lb-side-photos--compact .lb-ph-grid { grid-template-columns: repeat(5, 1fr); gap: 4px; }
.lb-side-photos--compact .lb-ph-tile { border-radius: 6px; }
/* Phones: the donate banner sits right under the live bar */
.lb-donate--top .txb-don { margin: 0.6rem 0.75rem 0.2rem; }

/* ── Embedded blog + gallery: tidy left column ───────────────────────── */
/* Photos as one quiet panel; tiles keep a fixed size however many photos there are */
.lb-side-photos--compact {
  margin: 0 0 1.1rem; padding: 0.7rem 0.8rem 0.8rem;
  border: 1px solid rgba(255,255,255,0.09); border-radius: 12px; background: rgba(255,255,255,0.03);
}
.lb-side-photos--compact .lb-ph-head {
  align-items: center; margin-bottom: 0.6rem; font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.07em; text-transform: uppercase; color: rgba(255,255,255,0.6);
}
.lb-side-photos--compact .lb-ph-all { font-size: 0.72rem; letter-spacing: 0; text-transform: none; }
.lb-side-photos--compact .lb-ph-grid { grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 6px; }
.lb-side-photos--compact .lb-ph-tile { border-radius: 8px; }
/* Logo and title: smaller, and the welcome text gets room to breathe */
.live-col-inner:has(> .lb-side-photos--compact) .lb-static-header { margin-bottom: 0.6rem; }
.live-col-inner:has(> .lb-side-photos--compact) .lb-static-header img { max-width: 170px; }
.live-col-inner:has(> .lb-side-photos--compact) .lb-static-header h3 { margin-top: 0.4rem; font-size: 0.9rem; letter-spacing: 0.01em; }
.live-col-inner:has(> .lb-side-photos--compact) > hr { margin: 0.6rem 0 1rem; }
.live-col-inner:has(> .lb-side-photos--compact) > p:first-of-type { margin-top: 0; }
.live-col-inner:has(> .lb-side-photos--compact) .lb-donate .txb-don { margin-top: 1.4rem; }
[data-theme="light"] .lb-side-photos--compact { border-color: rgba(0,0,0,0.1); background: rgba(0,0,0,0.025); }
[data-theme="light"] .lb-side-photos--compact .lb-ph-head { color: #5f6675; }
/* Title is already in the live bar */
.live-col-inner:has(> .lb-side-photos--compact) .lb-static-header h3 { display: none; }
/* Phones: the photos become a swipeable row (the native grid rule hides the panel here) */
@media (max-width: 767px) {
  .lb-side-photos.lb-side-photos--compact:not([hidden]) { display: block !important; margin-bottom: 0.9rem; }
  .lb-side-photos--compact .lb-ph-grid { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; }
  .lb-side-photos--compact .lb-ph-grid::-webkit-scrollbar { display: none; }
  .lb-side-photos--compact .lb-ph-tile { flex: 0 0 76px; width: 76px; height: 76px; scroll-snap-align: start; }
}
/* Phones: the page scrolls (no boxed inner scroller) and the logo block is dropped, like native blogs */
@media (max-width: 767px) {
  .live-col-inner:has(> .lb-side-photos--compact) { max-height: none; min-height: 0; overflow: visible; }
  .live-col-inner:has(> .lb-side-photos--compact) .lb-static-header,
  .live-col-inner:has(> .lb-side-photos--compact) .lb-static-header + hr { display: none; }
  .live-col:has(> .live-col-inner > .lb-side-photos--compact) { overflow: visible; }
}

/* ── 24liveblog posts as cards (the widget's own markup; overrides need !important) ── */
#LB24 .lb24-liveblog-container .lb24-default-list-item {
  margin: 0 0 0.7rem !important; padding: 0.9rem 1.1rem 0.7rem !important;
  border: 1px solid rgba(255,255,255,0.08) !important; border-radius: 12px !important; background-color: rgba(255,255,255,0.025);
}
#LB24 .lb24-default-list-item-date { color: rgba(255,255,255,0.5) !important; font-size: 0.78rem !important; }
#LB24 .lb24-default-list-item-title { color: #fff !important; font-weight: 700 !important; font-size: 1rem !important; }
#LB24 .lb24-default-list-item-editor span { color: rgba(255,255,255,0.8) !important; font-size: 0.82rem !important; }
#LB24 .lb24-default-list-item-update { color: rgba(255,255,255,0.4) !important; }
#LB24 .lb24-component-operation { margin-top: 0.6rem !important; padding-top: 0.5rem; border-top: 1px solid rgba(255,255,255,0.06); }
[data-theme="light"] #LB24 .lb24-liveblog-container .lb24-default-list-item { border-color: rgba(0,0,0,0.1) !important; background-color: rgba(0,0,0,0.02); }
[data-theme="light"] #LB24 .lb24-default-list-item-date { color: #5f6675 !important; }
[data-theme="light"] #LB24 .lb24-default-list-item-title { color: #1b1e24 !important; }
[data-theme="light"] #LB24 .lb24-default-list-item-editor span { color: #2b2f36 !important; }
[data-theme="light"] #LB24 .lb24-default-list-item-update { color: #697080 !important; }
[data-theme="light"] #LB24 .lb24-component-operation { border-top-color: rgba(0,0,0,0.08); }
/* Welcome line reads as the panel's heading */
.live-col-inner:has(> .lb-side-photos--compact) > p:first-of-type > strong { font-size: 1.15rem; letter-spacing: -0.005em; }

/* Phones: a grid column sizes to its widest content unless told it may shrink. The photo row
   (and any wide post content) was stretching the column past the screen; keep it to the viewport. */
@media (max-width: 767px) {
  .live-grid { grid-template-columns: minmax(0, 1fr); }
  .live-col, .live-col-inner, .lb-side-photos, .lb-side-photos--compact .lb-ph-grid { min-width: 0; max-width: 100%; }
  #LB24 .lb24-liveblog-container { max-width: 100%; }
  #LB24 .lb24-component-content { overflow-wrap: anywhere; }
  #LB24 .lb24-component-content img, #LB24 .lb24-component-content video, #LB24 .lb24-component-content iframe,
  #LB24 .lb24-component-content table { max-width: 100% !important; height: auto; }
}

/* Phones: slimmer photo strip (the full gallery is below, and the live bar has a Photos button) */
@media (max-width: 767px) {
  .lb-side-photos.lb-side-photos--compact:not([hidden]) { margin-bottom: 0.6rem; padding: 0.4rem 0.55rem 0.5rem; border-radius: 10px; }
  .lb-side-photos--compact .lb-ph-head { margin-bottom: 0.3rem; font-size: 0.64rem; }
  .lb-side-photos--compact .lb-ph-all { font-size: 0.68rem; }
  .lb-side-photos--compact .lb-ph-grid { gap: 4px; }
  .lb-side-photos--compact .lb-ph-tile { flex: 0 0 52px; width: 52px; height: 52px; border-radius: 6px; }
}

/* Donate pop-up: amount picker, $5 minimum */
.dn-amts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 0 0 14px; }
.dn-amt { display: flex; align-items: center; justify-content: center; height: 46px; border-radius: 12px; border: 1px solid rgba(255,255,255,.16);
  background: transparent; color: inherit; font-weight: 700; font-size: 1.02rem; cursor: pointer; transition: border-color .15s, background .15s; }
.dn-amt:hover { border-color: rgba(255,107,98,.6); }
.dn-amt.is-on { border-color: #ff6b62; background: rgba(161,6,6,.22); }
.dn-amt-other { grid-column: 1 / -1; gap: 4px; cursor: text; font-weight: 600; }
.dn-amt-other input { width: 90px; border: 0; background: transparent; color: inherit; font: inherit; font-weight: 700; outline: none; -moz-appearance: textfield; }
.dn-amt-other input::-webkit-outer-spin-button, .dn-amt-other input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.dn-alt { margin-top: 12px; }
.dn-link { background: none; border: 0; padding: 4px; color: #ff6b62; font-size: .82rem; text-decoration: underline; cursor: pointer; }
.dn-body .dn-uses { margin: 18px 0 0; }
[data-theme="light"] .dn-amt { border-color: #d3d6dc; }
[data-theme="light"] .dn-amt.is-on { border-color: #a10606; background: rgba(161,6,6,.08); }
[data-theme="light"] .dn-link { color: #a10606; }
