/* ─── Volunteer Media Hub -- Design tokens ──────────────────────────────── */
:root {
  --ink:       #F7F4F4;   /* soft off-white — page wrapper backgrounds */
  --ink-soft:  #F2EDED;   /* recessed surfaces: inputs, thumbnail backdrops */
  --ink-mid:   #E8E1E1;   /* placeholders / empty-cover gradients */
  --surface:   #FEFEFE;   /* page background — off-white */
  --card:      #FFFFFF;   /* card background */
  --border:    rgba(0,0,0,0.08);
  --border-md: rgba(0,0,0,0.16);

  --cream:     #1C1A1A;   /* primary text — near-black */
  --cream-dim: #786F6F;   /* secondary / muted text */
  --gold:      #CC0000;   /* default accent red, replaceable from Settings */
  --gold-rgb:  204,0,0;   /* same color as R,G,B triplet, for rgba() use in subtle backgrounds/shadows */
  --gold-dim:  #A30000;   /* darker red — hover / active */
  --gold-text: #FFFFFF;   /* text color for content sitting ON TOP of --gold -- white reads correctly against the default dark red; site_accent_style_override() recomputes this per the chosen color's actual luminance whenever the accent is customized */
  --danger:    #CC0000;
  --success:   #1B7A42;

  --font-display: 'Inter', 'Helvetica Neue', sans-serif;
  --font-body:    'Inter', 'Helvetica Neue', sans-serif;

  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 20px;

  --shadow-card: 0 4px 24px rgba(0,0,0,0.06);
  --shadow-lg:   0 16px 48px rgba(0,0,0,0.14);
  --transition:  all 0.22s ease;
}

/* ─── Reset ───────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--surface);
  color: var(--cream);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

/* ─── Typography ──────────────────────────────────────────────────────────── */
.display {
  font-family: var(--font-display);
  font-weight: 300;
  letter-spacing: 0.01em;
}
h1 { font-family: var(--font-display); font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 300; line-height: 1.15; }
h2 { font-family: var(--font-display); font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 300; }
h3 { font-family: var(--font-display); font-size: 1.35rem; font-weight: 400; }
p  { color: var(--cream-dim); }

/* ─── Layout ──────────────────────────────────────────────────────────────── */
.container   { max-width: 1280px; margin: 0 auto; padding: 0 32px; }
.container-sm{ max-width: 760px;  margin: 0 auto; padding: 0 24px; }

/* ─── Admin sidebar layout ────────────────────────────────────────────────── */
.app-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}
.app-sidebar {
  background: var(--ink);
  border-right: 1px solid var(--border);
  padding: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  z-index: 60;
}
.sidebar-logo {
  padding: 28px 24px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.sidebar-logo sub {
  display: block;
  font-family: var(--font-body);
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: 10px;
}
.sidebar-nav {
  padding: 16px 0;
  flex: 1;
}
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 24px;
  color: var(--cream-dim);
  font-size: 0.875rem;
  letter-spacing: 0.02em;
  transition: var(--transition);
  border-left: 2px solid transparent;
}
.sidebar-nav a:hover  { color: var(--cream); background: var(--border); }
.sidebar-nav a.active { color: var(--cream); border-left-color: var(--gold); background: rgba(var(--gold-rgb),0.07); }
.sidebar-nav .nav-icon { width: 18px; height: 18px; opacity: 0.7; flex-shrink: 0; }
.sidebar-nav .nav-label { flex: 1; }
.sidebar-nav .nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px; height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--gold);
  color: var(--gold-text);
  font-size: 0.65rem;
  font-weight: 700;
}
.sidebar-divider {
  height: 1px;
  background: var(--border);
  margin: 12px 24px;
}
.sidebar-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--cream-dim);
  flex-shrink: 0;
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.sidebar-username { font-size: 0.82rem; }
.sidebar-signout {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--cream-dim);
  font-size: 0.8rem;
}
.sidebar-signout:hover { color: var(--cream); }
.sidebar-signout .nav-icon { width: 16px; height: 16px; }

/* Hamburger toggle — hidden on desktop, shown via media query below */
.nav-toggle {
  display: none;
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 70;
  width: 40px;
  height: 40px;
  border-radius: var(--r-sm);
  background: var(--ink);
  border: 1px solid var(--border);
  color: var(--cream);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.nav-toggle svg { width: 20px; height: 20px; }
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 55;
}
.nav-overlay.open { display: block; }

@media (max-width: 900px) {
  .app-layout { grid-template-columns: 1fr; }
  .nav-toggle { display: flex; }
  .app-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 260px;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    box-shadow: 4px 0 24px rgba(0,0,0,0.3);
  }
  .app-sidebar.open { transform: translateX(0); }
  .sidebar-logo { padding-top: 64px; }
  .main-content { padding-top: 56px; }
  .page-header { padding: 20px 20px 16px; }
  .page-header h1 { font-size: 1.4rem; }
  .page-body { padding: 20px; }
}

.main-content {
  overflow: auto;
  background: var(--surface);
}
.page-header {
  padding: 36px 40px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.page-header h1 { font-size: 1.8rem; }
.page-body { padding: 32px 40px; }

/* ─── HQ-style page shell (page-wrap → topbar + page-layout) ─────────────
   Usage per page:
     <div class="page-wrap">
       <div class="topbar">
         <div class="breadcrumb"><span>Section</span><span class="sep">›</span><strong>Page</strong></div>
         <div class="topbar-actions">…buttons…</div>
       </div>
       <div class="page-layout">
         <div class="content">  ← main body
         </div>
         <aside class="right-panel">  ← help column
           <div class="panel-section">
             <div class="panel-title">Section heading</div>
             <ul class="panel-help-list">
               <li><strong>Term</strong> — explanation</li>
             </ul>
           </div>
           <div class="panel-tip">💡 Tip</div>
           <div class="panel-note">⚠️ Note</div>
         </aside>
       </div>
     </div>
   The old .content-with-help / .quick-help pattern still works on pages
   not yet migrated — both systems coexist. ───────────────────────────── */

.page-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* ── Top bar ── */
.topbar {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 0 32px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 30;
  flex-shrink: 0;
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.84rem;
  color: var(--cream-dim);
  min-width: 0;
}
.breadcrumb a {
  color: var(--cream-dim);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.12s;
}
.breadcrumb a:hover { color: var(--cream); }
.breadcrumb strong { color: var(--cream); font-weight: 500; }
.breadcrumb .sep { color: var(--cream-dim); opacity: 0.5; }
.topbar-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

/* ── Content + right-panel grid ── */
.page-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  flex: 1;
  min-height: 0;
}
.page-layout > .content {
  padding: 28px 32px;
  min-width: 0;
  overflow-x: hidden;
}

/* ── Right help panel ── */
.right-panel {
  border-left: 1px solid var(--border);
  background: var(--card);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 52px; /* sits directly under the topbar */
  max-height: calc(100vh - 52px);
}
.panel-section {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.panel-section:last-child { border-bottom: none; }
.panel-title {
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--cream-dim);
  opacity: 0.7;
  margin-bottom: 2px;
}
.panel-help-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.panel-help-list li {
  font-size: 0.78rem;
  color: var(--cream-dim);
  line-height: 1.55;
  padding-left: 12px;
  position: relative;
}
.panel-help-list li::before {
  content: '·';
  position: absolute;
  left: 0;
  color: var(--gold);
  font-weight: 700;
}
.panel-help-list li strong { color: var(--cream); font-weight: 600; }
.panel-help-list li code {
  background: var(--ink-soft);
  border: 1px solid var(--border-md);
  padding: 1px 5px;
  border-radius: 3px;
  font-family: monospace;
  font-size: 0.74rem;
}
.panel-tip {
  margin: 0 18px 14px;
  background: rgba(var(--gold-rgb), 0.07);
  border: 1px solid rgba(var(--gold-rgb), 0.2);
  border-radius: var(--r-sm);
  padding: 9px 12px;
  font-size: 0.76rem;
  color: var(--cream-dim);
  line-height: 1.5;
}
.panel-note {
  margin: 0 18px 14px;
  background: var(--ink-soft);
  border: 1px solid var(--border-md);
  border-radius: var(--r-sm);
  padding: 9px 12px;
  font-size: 0.76rem;
  color: var(--cream-dim);
  line-height: 1.5;
}

/* ── Mobile: collapse right panel, show "?" drawer button ── */
@media (max-width: 900px) {
  .topbar { padding: 0 16px; }
  .page-layout {
    grid-template-columns: 1fr;
  }
  .page-layout > .content { padding: 16px; }
  .right-panel { display: none; }
  .help-fab {
    display: flex !important;
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--gold);
    color: var(--gold-text);
    border: none;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(0,0,0,0.35);
    z-index: 100;
    font-size: 1.25rem;
    font-weight: 700;
    font-family: inherit;
    transition: transform 0.15s ease;
  }
  .help-fab:active { transform: scale(0.94); }
}
@media (min-width: 901px) {
  .help-fab    { display: none !important; }
  .help-drawer { display: none !important; }
}

/* ── Slide-in help drawer (mobile only) ── */
.help-drawer {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 300;
}
.help-drawer.open { display: block; }
.help-drawer-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
}
.help-drawer-inner {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 85vw;
  max-width: 320px;
  background: var(--ink);
  border-left: 1px solid var(--border);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
}
.help-drawer-header {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--ink);
  border-bottom: 1px solid var(--border);
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--cream);
  z-index: 1;
  flex-shrink: 0;
}
.help-drawer-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--cream-dim);
  font-size: 1.3rem;
  padding: 2px 6px;
  line-height: 1;
  font-family: inherit;
}
.help-drawer-close:hover { color: var(--cream); }
.help-drawer-body {
  flex: 1;
  overflow-y: auto;
}
.help-drawer-body .panel-section {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.help-drawer-body .panel-tip,
.help-drawer-body .panel-note {
  margin: 10px 18px;
}
.help-drawer-body .panel-help-list li { font-size: 0.82rem; }

/* ─── Cards ───────────────────────────────────────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
}
.card-body { padding: 24px; }

/* ─── Stats row ───────────────────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}
.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 22px 24px;
}
.stat-card .stat-label {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 6px;
}
.stat-card .stat-value {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 300;
  line-height: 1;
  color: var(--cream);
}

/* ─── Session grid (admin) ────────────────────────────────────────────────── */
.sessions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.session-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
}
.session-card:hover {
  border-color: var(--border-md);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}
.session-card-cover {
  aspect-ratio: 3/2;
  background: var(--ink-mid);
  overflow: hidden;
  position: relative;
}
.session-card-cover img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.session-card:hover .session-card-cover img { transform: scale(1.04); }
.session-card-cover .cover-placeholder {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--ink-soft), var(--ink-mid));
}
.session-card-cover .cover-placeholder svg { opacity: 0.35; }
.session-card-info { padding: 18px 20px; }
.session-card-info .client-name {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 4px;
}
.session-card-info h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
  color: var(--cream);
}
.session-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--cream-dim);
}
.session-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  background: rgba(0,0,0,0.045);
}
.session-badge.active  { background: rgba(27,122,66,0.12); color: var(--success); }
.session-badge.expired { background: rgba(204,0,0,0.12);  color: var(--danger);  }
.session-badge.locked  { background: rgba(204,0,0,0.12); color: #CC0000;    }

/* ─── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--r-sm);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  text-decoration: none;
}
.btn-primary {
  background: var(--gold);
  color: var(--gold-text);
}
.btn-primary:hover { background: var(--gold-dim); }
.btn-secondary {
  background: var(--border);
  color: var(--cream);
  border: 1px solid var(--border-md);
}
.btn-secondary:hover { background: rgba(0,0,0,0.05); }
.btn-ghost {
  background: transparent;
  color: var(--cream-dim);
  border: 1px solid var(--border-md);
}
.btn-ghost:hover { color: var(--cream); border-color: rgba(0,0,0,0.28); }
.btn-danger {
  background: transparent;
  color: var(--danger);
  border: 1px solid var(--danger);
}
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-sm { padding: 6px 14px; font-size: 0.8rem; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }
.btn-icon { padding: 8px; border-radius: var(--r-sm); }

/* ─── Forms ───────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cream-dim);
  margin-bottom: 7px;
}
.form-control {
  width: 100%;
  background: var(--ink-soft);
  border: 1px solid var(--border-md);
  border-radius: var(--r-sm);
  color: var(--cream);
  padding: 10px 14px;
  outline: none;
  transition: var(--transition);
}
.form-control:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(var(--gold-rgb),0.12); }
.form-control::placeholder { color: rgba(0,0,0,0.32); }
textarea.form-control { resize: vertical; min-height: 90px; }
.form-hint { font-size: 0.78rem; color: var(--cream-dim); margin-top: 5px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ─── Upload zone ─────────────────────────────────────────────────────────── */
.upload-zone {
  border: 2px dashed var(--border-md);
  border-radius: var(--r-md);
  padding: 48px 24px;
  text-align: center;
  transition: var(--transition);
  cursor: pointer;
}
.upload-zone:hover, .upload-zone.dragover {
  border-color: var(--gold);
  background: rgba(var(--gold-rgb),0.04);
}
.upload-zone.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.upload-zone.disabled:hover { border-color: var(--border-md); background: none; }
.upload-zone p { font-size: 0.9rem; margin-top: 10px; }
.upload-icon { font-size: 2.5rem; margin-bottom: 8px; opacity: 0.4; }

/* ─── Photo grid ──────────────────────────────────────────────────────────── */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 4px;
}
.photo-thumb {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--ink-mid);
  cursor: pointer;
}
.photo-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.photo-thumb:hover img { transform: scale(1.05); }
.photo-thumb .photo-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  opacity: 0;
  transition: var(--transition);
}
.photo-thumb:hover .photo-overlay { opacity: 1; }
.photo-overlay-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  color: #fff;
  font-size: 0.9rem;
}
.photo-overlay-btn:hover { background: rgba(255,255,255,0.22); }

/* ─── Alerts ──────────────────────────────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: var(--r-sm);
  font-size: 0.875rem;
  margin-bottom: 20px;
}
.alert-success { background: rgba(27,122,66,0.1); border: 1px solid rgba(27,122,66,0.2); color: var(--success); }
.alert-error   { background: rgba(204,0,0,0.1);  border: 1px solid rgba(204,0,0,0.2);  color: var(--danger); }
.alert-info    { background: rgba(29,111,184,0.08); border: 1px solid rgba(29,111,184,0.2); color: #1D6FB8; }

/* ─── Table ───────────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th {
  text-align: left;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cream-dim);
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
}
td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--cream-dim);
}
td:first-child { color: var(--cream); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(0,0,0,0.025); }

/* ─── Modal / Lightbox ────────────────────────────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.93);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}
.lightbox.open { opacity: 1; pointer-events: all; }
.lightbox-img {
  max-width: calc(100vw - 120px);
  max-height: calc(100vh - 80px);
  object-fit: contain;
  border-radius: var(--r-sm);
  box-shadow: var(--shadow-lg);
  -webkit-user-drag: none;
  user-drag: none;
  -webkit-touch-callout: none;
}
.lightbox-close {
  position: absolute;
  top: 20px; right: 24px;
  background: none;
  border: none;
  color: rgba(255,255,255,0.55);
  font-size: 1.8rem;
  cursor: pointer;
  line-height: 1;
  transition: var(--transition);
}
.lightbox-close:hover { color: #fff; }
.lightbox-nav {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  color: #fff;
  width: 48px; height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.2rem;
  transition: var(--transition);
}
.lightbox-nav:hover { background: rgba(255,255,255,0.15); }
.lightbox-download {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: var(--r-sm);
  color: rgba(255,255,255,0.85);
  font-size: 0.8rem;
  text-decoration: none;
  transition: var(--transition);
}
.lightbox-download:hover { background: rgba(255,255,255,0.18); color: #fff; }
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

/* ─── Login page ──────────────────────────────────────────────────────────── */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ink);
  position: relative;
  overflow: hidden;
}
.login-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 60%, rgba(var(--gold-rgb),0.06) 0%, transparent 60%);
}
.login-box {
  width: 100%;
  max-width: 400px;
  padding: 48px 40px;
  background: var(--card);
  border: 1px solid var(--border-md);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  position: relative;
  z-index: 1;
}
.login-logo {
  text-align: center;
  margin-bottom: 36px;
}
.login-logo h1 { font-size: 2.8rem; letter-spacing: 0.15em; }
.login-logo span {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: 4px;
}

/* ─── CLIENT gallery pages ────────────────────────────────────────────────── */
.gallery-hero {
  height: 100vh;
  min-height: 560px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: 64px;
  overflow: hidden;
}
.gallery-hero-bg {
  position: absolute;
  inset: 0;
  background: var(--ink);
}
.gallery-hero-bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.55;
}
.gallery-hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.65) 100%);
}
.gallery-hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
}
.gallery-hero-content .eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
}
.gallery-hero-content h1 {
  font-size: clamp(2.8rem, 7vw, 5rem);
  font-weight: 300;
  letter-spacing: 0.04em;
  text-shadow: 0 2px 20px rgba(0,0,0,0.5);
}
.gallery-hero-content p {
  color: rgba(245,240,232,0.7);
  margin-top: 10px;
  font-size: 1rem;
}
.gallery-hero-scroll {
  position: relative;
  z-index: 1;
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(245,240,232,0.5);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
}
.scroll-arrow {
  width: 28px; height: 28px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: bounce 2s infinite;
}
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(5px); }
}

.gallery-section {
  padding: 64px 32px;
  background: var(--surface);
  max-width: 1280px;
  margin: 0 auto;
}
@media (max-width: 900px) {
  .gallery-section { padding: 40px 20px; }
}
.gallery-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 16px;
}
.gallery-toolbar h2 {
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--cream-dim);
}
.gallery-masonry { column-count: 2; column-gap: 4px; }
@media (min-width: 1300px) { .gallery-masonry { column-count: 3; } }
@media (max-width: 900px)  { .gallery-masonry { column-count: 2; } }
@media (max-width: 560px)  { .gallery-masonry { column-count: 1; } }
.gallery-masonry-item {
  break-inside: avoid;
  margin-bottom: 4px;
  cursor: pointer;
  overflow: hidden;
  position: relative;
}
.gallery-masonry-item img {
  width: 100%;
  display: block;
  transition: transform 0.5s ease;
  -webkit-user-drag: none;
  user-drag: none;
  -webkit-touch-callout: none;
}
.gallery-masonry-item:hover img { transform: scale(1.03); }
.gallery-masonry-item .item-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
}
.gallery-masonry-item:hover .item-overlay { background: rgba(0,0,0,0.25); }
.gallery-masonry-item .item-overlay svg { opacity: 0; transition: opacity 0.3s; }
.gallery-masonry-item:hover .item-overlay svg { opacity: 1; }

/* Download bar */
.download-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: rgba(10,10,12,0.92);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  z-index: 100;
}
.download-bar p { font-size: 0.85rem; color: var(--cream-dim); }

/* Password gate */
.password-gate {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ink);
  position: relative;
}
.password-gate::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 70% 40%, rgba(var(--gold-rgb),0.05) 0%, transparent 60%);
}

/* ─── Progress bar (upload) ───────────────────────────────────────────────── */
.progress-wrap { margin-top: 16px; }
.progress-bar-outer {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.progress-bar-inner {
  height: 100%;
  background: var(--gold);
  border-radius: 2px;
  transition: width 0.3s ease;
  width: 0%;
}

/* ─── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .form-row { grid-template-columns: 1fr; }
}

/* ─── Misc ────────────────────────────────────────────────────────────────── */
.text-gold  { color: var(--gold); }
.text-dim   { color: var(--cream-dim); }
.text-sm    { font-size: 0.85rem; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.flex { display: flex; align-items: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 16px; }
.ml-auto { margin-left: auto; }
.divider { height: 1px; background: var(--border); margin: 24px 0; }
.empty-state {
  text-align: center;
  padding: 64px 24px;
  color: var(--cream-dim);
}
.empty-state svg { opacity: 0.35; margin: 0 auto 16px; }
.empty-state h3 { font-family: var(--font-display); font-weight: 300; font-size: 1.5rem; color: var(--cream); margin-bottom: 8px; }

/* ════════════════════════════════════════════════════════════════════════
   V2 — Association platform additions
   ════════════════════════════════════════════════════════════════════════ */

/* ─── Member content area (sits inside .app-layout/.main-content) ───────── */
.member-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px 32px 80px;
}
.member-main h1 { margin-bottom: 6px; }
.member-main .page-sub { color: var(--cream-dim); margin-bottom: 32px; font-size: 0.9rem; }

@media (max-width: 900px) {
  .member-main { padding: 24px 20px 60px; }
}

/* ─── Role & status badges ───────────────────────────────────────────────── */
.role-badge, .status-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 600;
}
.role-badge.admin      { background: rgba(204,0,0,0.15); color: #CC0000; }
.role-badge.super_admin{ background: rgba(204,0,0,0.22); color: #CC0000; font-weight: 700; }
.role-badge.member     { background: rgba(27,122,66,0.12); color: var(--success); }

.status-pill.pending   { background: rgba(204,0,0,0.12); color: #CC0000; }
.status-pill.approved  { background: rgba(27,122,66,0.12); color: var(--success); }
.status-pill.rejected  { background: rgba(204,0,0,0.12);  color: var(--danger); }
.status-pill.suspended { background: rgba(204,0,0,0.12);  color: var(--danger); }
.status-pill.draft     { background: rgba(0,0,0,0.05); color: var(--cream-dim); }
.status-pill.published { background: rgba(27,122,66,0.12); color: var(--success); }

/* ─── Category preview tabs (member/index.php, admin/super-admin only) ──── */
.category-preview-bar {
  margin-bottom: 24px;
}
.category-preview-label {
  display: block;
  font-size: 0.78rem;
  color: var(--cream-dim);
  margin-bottom: 8px;
}
.category-preview-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}
.category-preview-tab {
  flex: 1 1 auto;
  min-width: 110px;
  text-align: center;
  padding: 10px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--cream-dim);
  text-decoration: none;
  border-radius: var(--r-sm) var(--r-sm) 0 0;
  border-bottom: 2px solid transparent;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.category-preview-tab:hover {
  background: var(--ink-soft);
  color: var(--cream);
}
.category-preview-tab.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
  background: var(--ink-soft);
}
@media (max-width: 600px) {
  .category-preview-tab {
    flex: 1 1 calc(50% - 8px);
    min-width: 0;
  }
}

/* ─── Settings page tabs (admin/settings.php) ────────────────────────────── */
.settings-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 40px 28px;
}
.settings-tab {
  flex: 1 1 auto;
  min-width: 120px;
  text-align: center;
  padding: 11px 18px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--cream-dim);
  text-decoration: none;
  border-radius: 999px;
  border: 1px solid var(--border-md);
  background: var(--card);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.settings-tab:hover {
  background: var(--ink-soft);
  color: var(--cream);
  border-color: var(--cream-dim);
}
.settings-tab.active {
  color: var(--gold-text);
  background: var(--gold);
  border-color: var(--gold);
  font-weight: 700;
}
@media (max-width: 900px) {
  .settings-tabs {
    margin: 0 20px 22px;
    gap: 8px;
  }
  .settings-tab {
    flex: 1 1 calc(33.333% - 8px);
    min-width: 0;
    font-size: 0.78rem;
    padding: 10px 10px;
  }
}
@media (max-width: 480px) {
  .settings-tab {
    flex: 1 1 calc(50% - 8px);
  }
}

/* ─── Activity log ────────────────────────────────────────────────────── */
.activity-row {
  display: flex; align-items: flex-start; gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.activity-row:last-child { border-bottom: none; }
.activity-row .when {
  flex-shrink: 0; width: 120px;
  font-size: 0.78rem; color: var(--cream-dim);
}
.activity-row .body { flex: 1; min-width: 0; }
.activity-row .who { font-size: 0.85rem; color: var(--cream); margin-bottom: 4px; }
.activity-row .target { font-size: 0.85rem; color: var(--cream-dim); overflow-wrap: break-word; }
.activity-row .details-text {
  font-size: 0.78rem; color: var(--cream-dim); font-style: italic;
  margin-top: 4px; overflow-wrap: break-word;
}
/* Reuses the role-badge/status-pill base style above for a consistent
   pill look, with three generic semantic variants rather than one rule
   per action type — good for approvals/additions, bad for deletions/
   rejections, neutral for everything else (renames, settings changes). */
.action-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 20px;
  font-size: 0.7rem; letter-spacing: 0.05em; text-transform: uppercase;
  font-weight: 600; white-space: nowrap;
}
.action-pill.good    { background: rgba(27,122,66,0.12); color: var(--success); }
.action-pill.bad     { background: rgba(204,0,0,0.12);  color: var(--danger); }
.action-pill.neutral { background: rgba(0,0,0,0.05);    color: var(--cream-dim); }

@media (max-width: 600px) {
  .activity-row { flex-direction: column; gap: 6px; }
  .activity-row .when { width: auto; }
}

/* ─── Bulk operations toolbar (admin/members.php, admin/review.php) ───── */
.bulk-toolbar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--ink-soft);
  border: 1px solid var(--border-md);
  border-radius: var(--r-sm);
  padding: 10px 14px;
  margin-bottom: 10px;
}
.bulk-select-all {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.82rem; color: var(--cream); cursor: pointer;
  white-space: nowrap;
}
.bulk-count {
  font-size: 0.78rem; color: var(--cream-dim);
  white-space: nowrap;
}
.bulk-row-cb {
  margin-right: 4px; flex-shrink: 0;
  width: 16px; height: 16px;
}
/* The checkbox sits directly on top of a photo thumbnail on the review
   page, so it needs its own visible backing rather than relying on
   page background contrast, which varies by photo. */
.review-card .bulk-row-cb {
  margin: 0;
  background: rgba(0,0,0,0.55);
  border-radius: 4px;
  outline: 2px solid rgba(255,255,255,0.8);
  cursor: pointer;
}
@media (max-width: 600px) {
  .bulk-toolbar { flex-direction: column; align-items: stretch; }
  .bulk-toolbar .bulk-select-all,
  .bulk-toolbar .bulk-count { align-self: flex-start; }
  .bulk-toolbar select,
  .bulk-toolbar button { width: 100%; }
}

/* ─── Gallery cards (member dashboard) ───────────────────────────────────── */
.gallery-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.gallery-card-link {
  display: block;
  text-decoration: none;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: var(--transition);
}
.gallery-card-link:hover {
  border-color: var(--border-md);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}
.gallery-card-link .cover {
  aspect-ratio: 3/2;
  background: var(--ink-mid);
  overflow: hidden;
  position: relative;
}
.gallery-card-link .cover img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.5s ease;
}
.gallery-card-link:hover .cover img { transform: scale(1.04); }
.gallery-card-link .cover .no-cover {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--ink-soft), var(--ink-mid));
}
.gallery-card-link .body { padding: 16px 18px; }
.gallery-card-link .eyebrow {
  font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 4px;
}
.gallery-card-link h3 { font-size: 1.15rem; margin-bottom: 8px; color: var(--cream); }
.gallery-card-link .meta {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 0.78rem; color: var(--cream-dim);
}

/* ─── Submission / review grid ───────────────────────────────────────────── */
.review-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.review-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  position: relative;
}
.review-card .thumb {
  aspect-ratio: 1; background: var(--ink-mid); overflow: hidden;
}
.review-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.review-card .info { padding: 14px 16px; }
.review-card .info .meta-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.78rem; color: var(--cream-dim); margin-bottom: 10px;
}
.review-card .info .meta-row .submitter { color: var(--cream); }
.review-card .info .event-tag {
  display: inline-block; font-size: 0.72rem; color: var(--gold);
  background: rgba(var(--gold-rgb),0.1); padding: 2px 8px; border-radius: 12px;
  margin-bottom: 10px;
}
.review-card .actions { display: flex; gap: 8px; }
.review-card .actions form { flex: 1; }
.review-card .actions select {
  width: 100%; margin-bottom: 8px;
  background: var(--ink-soft); border: 1px solid var(--border-md);
  border-radius: var(--r-sm); color: var(--cream); padding: 7px 10px; font-size: 0.8rem;
}
.review-card .reject-note {
  width: 100%; margin-bottom: 8px;
  background: var(--ink-soft); border: 1px solid var(--border-md);
  border-radius: var(--r-sm); color: var(--cream); padding: 7px 10px; font-size: 0.8rem;
  resize: vertical; min-height: 50px;
}

/* ─── Member submissions list ────────────────────────────────────────────── */
.submission-row {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.submission-row:last-child { border-bottom: none; }
.submission-row .thumb {
  width: 64px; height: 64px; border-radius: var(--r-sm);
  overflow: hidden; background: var(--ink-mid); flex-shrink: 0;
}
.submission-row .thumb img { width: 100%; height: 100%; object-fit: cover; }
.submission-row .thumb-gone {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; opacity: 0.4;
}
.submission-row .details { flex: 1; min-width: 0; }
.submission-row .details .name { color: var(--cream); font-size: 0.9rem; margin-bottom: 4px; overflow-wrap: break-word; word-break: normal; }
.submission-row .details .meta { font-size: 0.78rem; color: var(--cream-dim); }
.submission-row .note {
  font-size: 0.78rem; color: var(--cream-dim); margin-top: 4px;
  font-style: italic;
}

/* ─── Member table (admin) ───────────────────────────────────────────────── */
.member-row-actions { display: flex; gap: 8px; }

/* ─── Auth pages (login/register) ────────────────────────────────────────── */
.auth-wrap {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: var(--ink);
  position: relative; overflow: hidden;
  padding: 24px;
}
.auth-wrap::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 30% 60%, rgba(var(--gold-rgb),0.06) 0%, transparent 60%);
}
.auth-box {
  width: 100%; max-width: 440px;
  padding: 44px 40px;
  background: var(--card);
  border: 1px solid var(--border-md);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  position: relative; z-index: 1;
}
.auth-logo { text-align: center; margin-bottom: 28px; }
.auth-logo span {
  display: block; font-size: 0.66rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--gold); margin-top: 14px;
}
.auth-switch {
  text-align: center; margin-top: 22px; font-size: 0.85rem; color: var(--cream-dim);
}
.auth-switch a { color: var(--gold); }
.role-pick { display: flex; gap: 10px; }
.role-pick label {
  flex: 1; text-align: center; cursor: pointer;
  border: 1px solid var(--border-md); border-radius: var(--r-sm);
  padding: 14px 10px; transition: var(--transition);
}
.role-pick input { display: none; }
.role-pick input:checked + span,
.role-pick label:has(input:checked) {
  border-color: var(--gold);
}
.role-pick label:has(input:checked) {
  background: rgba(var(--gold-rgb),0.08);
}
.role-pick .role-icon { font-size: 1.6rem; display: block; margin-bottom: 6px; }
.role-pick .role-name { font-size: 0.85rem; color: var(--cream); }
.role-pick .role-desc { font-size: 0.7rem; color: var(--cream-dim); margin-top: 2px; display: block; }

/* ─── Pending / info pages ────────────────────────────────────────────────── */
.info-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: var(--ink); text-align: center; padding: 32px;
}
.info-page .icon { font-size: 3rem; margin-bottom: 16px; opacity: 0.5; }
.info-page h1 { margin-bottom: 12px; }
.info-page p { max-width: 420px; margin: 0 auto; }
.info-page .actions { margin-top: 24px; display: flex; gap: 12px; justify-content: center; }

/* ─── Public legal pages (legal/index.php) ───────────────────────────────── */
.legal-page-wrap {
  min-height: 100vh;
  background: var(--ink);
  padding: 48px 24px 80px;
}
.legal-back-link {
  display: inline-block;
  color: var(--cream-dim);
  font-size: 0.85rem;
  text-decoration: none;
  margin-bottom: 24px;
}
.legal-back-link:hover { color: var(--gold); }
.legal-page-wrap h1.display {
  max-width: 680px; margin: 0 auto 28px;
}
.legal-content {
  max-width: 680px; margin: 0 auto;
  color: var(--cream-dim);
  line-height: 1.7;
  font-size: 0.95rem;
}
.legal-content p { margin-bottom: 16px; }
.legal-content ul, .legal-content ol { margin: 0 0 16px 20px; }
.legal-content a { color: var(--gold); }
.legal-content h2 { color: var(--cream); font-size: 1.2rem; margin: 28px 0 12px; }
.legal-content h3 { color: var(--cream); font-size: 1.05rem; margin: 22px 0 10px; }
@media (max-width: 600px) {
  .legal-page-wrap { padding: 32px 18px 64px; }
}

/* ─── Gallery view (member) ───────────────────────────────────────────────── */
.gallery-info-bar {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px;
  padding: 20px 32px;
  border-bottom: 1px solid var(--border);
}
.gallery-info-bar .titles h1 { font-size: 1.8rem; margin-bottom: 4px; }
.gallery-info-bar .titles .sub { font-size: 0.85rem; color: var(--cream-dim); }

/* ─── Additional utilities ───────────────────────────────────────────────── */
.mb-4 { margin-bottom: 32px; }

/* ─── Brand logo ──────────────────────────────────────────────────────────── */
.brand-logo { display: block; height: auto; width: auto; max-width: 100%; }
.sidebar-logo .brand-logo    { max-width: 100%; height: auto; }
.auth-logo .brand-logo       { max-width: 280px; width: 100%; height: auto; margin: 0 auto; }
.info-page .brand-logo       { max-width: 240px; width: 100%; height: auto; margin: 0 auto 28px; }

/* ─── Landing page ────────────────────────────────────────────────────────── */
.landing-wrap {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface);
  position: relative; overflow: hidden;
  padding: 24px;
}
.landing-wrap::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(var(--gold-rgb),0.05) 0%, transparent 60%);
}
.landing-box {
  width: 100%; max-width: 560px;
  text-align: center;
  position: relative; z-index: 1;
}
.landing-logo img { max-width: 420px; width: 100%; height: auto; margin: 0 auto 36px; }
.landing-tagline {
  font-size: 1.05rem;
  color: var(--cream-dim);
  max-width: 440px;
  margin: 0 auto 36px;
  line-height: 1.7;
}
.landing-actions {
  display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
}
.landing-welcome {
  font-size: 1.05rem;
  color: var(--cream-dim);
  margin-bottom: 28px;
}

/* ─── Site footer (shared across all pages) ──────────────────────────── */
/* ─── Cookie consent banner (includes/footer.php) ────────────────────────── */
.cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 200;
  background: var(--ink-soft);
  border-top: 1px solid var(--border-md);
  padding: 16px 24px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; flex-wrap: wrap;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.25);
}
.cookie-banner p {
  margin: 0; flex: 1; min-width: 220px;
  font-size: 0.85rem; color: var(--cream-dim);
}
.cookie-banner p a { color: var(--gold); }
.cookie-banner-actions {
  display: flex; gap: 10px; flex-shrink: 0;
}
@media (max-width: 600px) {
  .cookie-banner { flex-direction: column; align-items: stretch; padding: 16px; }
  .cookie-banner-actions { width: 100%; }
  .cookie-banner-actions button { flex: 1; }
}

/* ─── Update toast (includes/functions.php update_toast_html()) ─────────── */
.update-toast {
  position: fixed; top: 16px; right: 16px; z-index: 210;
  background: var(--card);
  border: 1px solid var(--border-md);
  border-radius: var(--r-sm);
  padding: 12px 16px;
  display: flex; align-items: center; gap: 12px;
  font-size: 0.85rem; color: var(--cream);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  max-width: 360px;
}
.update-toast a { color: var(--gold); white-space: nowrap; }
.update-toast-close {
  background: none; border: none; color: var(--cream-dim);
  font-size: 1.2rem; line-height: 1; cursor: pointer; padding: 0 0 0 4px;
  flex-shrink: 0;
}
.update-toast-close:hover { color: var(--cream); }
@media (max-width: 600px) {
  .update-toast { left: 16px; right: 16px; top: 12px; max-width: none; }
}

.site-footer {
  text-align: center;
  padding: 24px 16px;
  font-size: 0.78rem;
  color: var(--cream-dim);
  border-top: 1px solid var(--border-md);
}
.site-footer a {
  color: var(--cream-dim);
  text-decoration: underline;
}
.site-footer a:hover {
  color: var(--gold);
}
.site-footer-legal-links {
  margin-bottom: 8px;
}

/* ─── Quick help (right sidebar on desktop, inline blurb on mobile) ─────── */
/* Markup: a wrapper <div class="content-with-help"> contains the page's
   normal content plus a <aside class="quick-help">…</aside> as the LAST
   child. On wide screens this becomes a 2-column flex row with the help
   panel pinned to the right and sticky while scrolling. Under 900px it
   reverts to a plain stacked block (the "blurb") above the content. */
.content-with-help {
  display: flex;
  align-items: flex-start;
  gap: 28px;
}
.content-with-help > .content-main {
  flex: 1;
  min-width: 0;
}
.quick-help {
  flex: 0 0 260px;
  background: var(--ink-soft);
  border: 1px solid var(--border-md);
  border-radius: var(--r-md);
  padding: 16px 18px;
  font-size: 0.85rem;
  position: sticky;
  top: 24px;
}
.quick-help h4 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--cream-dim);
  margin-bottom: 10px;
}
.quick-help h4::before {
  content: "?";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--gold-text);
  font-size: 0.7rem;
  font-weight: 700;
  flex-shrink: 0;
}
.quick-help p {
  color: var(--cream-dim);
  line-height: 1.65;
  margin: 0 0 10px;
}
.quick-help p:last-child { margin-bottom: 0; }

/* Standalone usage (auth/landing pages with no .content-with-help wrapper):
   render as a plain inline blurb block, not a sticky flex sidebar. */
.quick-help:not(.content-with-help > .quick-help) {
  flex: none;
  position: static;
  width: auto;
  margin: 20px 0;
}

/* Floating "?" button that opens the quick-help panel on mobile.
   Hidden on desktop; the JS toggle only runs inside .content-with-help
   pages, since standalone pages (auth/landing) render the blurb inline
   at every width and have no FAB. Base rule (hidden) MUST come before
   the @media override below — same specificity, so file order decides
   which one wins, and the override needs to win on mobile. */
.quick-help-fab {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 90;
  width: 56px;
  height: 56px;
  box-sizing: border-box;
  border-radius: 50%;
  background: var(--gold);
  color: var(--gold-text);
  border: none;
  padding: 0;
  margin: 0;
  line-height: 0;
  -webkit-appearance: none;
  appearance: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,0,0,0.35), 0 1px 3px rgba(0,0,0,0.2);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  display: none;
}
@media (min-width: 901px) {
  .quick-help-fab { display: none !important; }
}
.quick-help-fab:active {
  transform: scale(0.94);
  box-shadow: 0 2px 8px rgba(0,0,0,0.35);
}
.quick-help-fab svg {
  display: block;
  position: absolute;
  top: 50%;
  left: 50%;
  width: 24px;
  height: 24px;
  margin: -12px 0 0 -12px;
  flex-shrink: 0;
}
.quick-help-fab-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 75;
}
.quick-help-fab-overlay.open { display: block; }
.quick-help-close { display: none; }

@media (max-width: 900px) {
  .content-with-help {
    display: block;
  }
  .content-with-help > .quick-help {
    display: none;
    position: fixed;
    right: 16px;
    bottom: 92px;
    left: 16px;
    max-height: 60vh;
    overflow-y: auto;
    width: auto;
    flex: none;
    z-index: 80;
    box-shadow: 0 8px 32px rgba(0,0,0,0.35);
  }
  .content-with-help > .quick-help.open {
    display: block;
  }
  .quick-help-fab {
    display: flex;
  }
  .quick-help-close {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 10px;
    right: 10px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--border-md);
    border: none;
    color: var(--cream);
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
  }
}
