/* ============================================================
   VENUS'S READING CHALLENGE — Main Stylesheet
   De Stijl / Bart van der Leck design
   ============================================================ */

/* ── Variables ──────────────────────────────────────────── */
:root {
  --red:    #CC2200;
  --blue:   #0044BB;
  --yellow: #F0B400;
  --black:  #111111;
  --white:  #FFFFFF;
  --bw:     3px;
  --radius:    10px;
  --radius-sm: 6px;
  --shadow-sm: 0 2px 8px rgba(17,17,17,0.09);
  --shadow-md: 0 4px 18px rgba(17,17,17,0.13);
  --shadow-lg: 0 8px 32px rgba(17,17,17,0.17);

  /* De Stijl side column width — caps at 130px so it never dominates */
  --bg-col: min(10vw, 130px);
}

/* ── Reset & base ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Nunito', system-ui, sans-serif;
  color: var(--black);
  min-height: 100vh;
  line-height: 1.5;

  /*
   * De Stijl background — red left column, white centre, blue right column.
   * Uses --bg-col (capped in px) so columns shrink on narrow screens without
   * ever squeezing the centre content. background-attachment: fixed keeps it
   * painted to the viewport as a canvas while the page scrolls.
   */
  background-color: var(--white);
  background-image:
    /* Left black divider */
    linear-gradient(to right,
      transparent calc(var(--bg-col) - 0.25vw),
      var(--black) calc(var(--bg-col) - 0.25vw),
      var(--black) calc(var(--bg-col) + 0.25vw),
      transparent calc(var(--bg-col) + 0.25vw)
    ),
    /* Right black divider */
    linear-gradient(to right,
      transparent calc(100% - var(--bg-col) - 0.25vw),
      var(--black) calc(100% - var(--bg-col) - 0.25vw),
      var(--black) calc(100% - var(--bg-col) + 0.25vw),
      transparent calc(100% - var(--bg-col) + 0.25vw)
    ),
    /* Red left | white centre | blue right */
    linear-gradient(to right,
      var(--red)   0,                       var(--red)   var(--bg-col),
      var(--white) var(--bg-col),            var(--white) calc(100% - var(--bg-col)),
      var(--blue)  calc(100% - var(--bg-col)), var(--blue) 100%
    );
  background-attachment: fixed;
  background-size: 100% 100%;
  background-repeat: no-repeat;
}

/* ── Header ─────────────────────────────────────────────── */
header {
  /*
   * Body columns: red 0–12%, centre 12–88%, yellow+blue 88–100%.
   * Header blocks (left→right):
   *   WHITE  0–12%       (matches body red column width)
   *   YELLOW 12–84%    (80% of body centre: 80% × 76% = 60.8%)
   *   BLACK  72.8–88%    (20% of body centre: 20% × 76% = 15.2%)
   *   WHITE  88–100%     (matches body right column width)
   * Lines at 12%, 84%, 88% — all 0.5vw to match SVG stroke.
   * Border-bottom also 0.5vw to match.
   */
  background-color: var(--yellow);
  background-image:
    /* Left divider — aligns with body */
    linear-gradient(to right,
      transparent calc(var(--bg-col) - 0.25vw),
      var(--black) calc(var(--bg-col) - 0.25vw),
      var(--black) calc(var(--bg-col) + 0.25vw),
      transparent calc(var(--bg-col) + 0.25vw)
    ),
    /* Right divider — aligns with body */
    linear-gradient(to right,
      transparent calc(100% - var(--bg-col) - 0.25vw),
      var(--black) calc(100% - var(--bg-col) - 0.25vw),
      var(--black) calc(100% - var(--bg-col) + 0.25vw),
      transparent calc(100% - var(--bg-col) + 0.25vw)
    ),
    /* White left | yellow centre | black right */
    linear-gradient(to right,
      var(--white)  0,                         var(--white)  var(--bg-col),
      var(--yellow) var(--bg-col),              var(--yellow) calc(100% - var(--bg-col)),
      var(--black)  calc(100% - var(--bg-col)), var(--black)  100%
    );
  color: var(--black);
  padding: 0;
  position: relative;
  border-bottom: 0.5vw solid var(--black);
  overflow: hidden;
}

.header-bg-stars { display: none; }

.header-content {
  position: relative;
  z-index: 1;
  padding: 3.5rem 32% 4rem calc(var(--bg-col) + 2%);
  text-align: left;
}

.header-book {
  font-size: 3.5rem;
  display: block;
  margin-bottom: 0.75rem;
  line-height: 1;
}

header h1 {
  font-family: 'Playwrite GB S', Georgia, serif;
  font-size: clamp(2rem, 5vw, 3.6rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.15;
  color: var(--black);
  text-shadow: none;
  margin-bottom: 0.5rem;
}

.header-sub {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--black);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.5;
}

/* ── Main layout ────────────────────────────────────────── */
main {
  max-width: 1200px;
  width: calc(100% - 2 * (var(--bg-col) + 1.5rem));
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}

.section-title {
  font-family: 'Playwrite GB S', Georgia, serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 1.25rem;
}

/* ── Stats ──────────────────────────────────────────────── */
.stats-section {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-top: 2rem;
  margin-bottom: 3rem;
  position: relative;
  z-index: 10;
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.6rem 1.2rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1.5px solid rgba(17,17,17,0.08);
  border-top: 6px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.stat-card.stat-books   { border-top-color: var(--red);    }
.stat-card.stat-reading { border-top-color: var(--blue);   }
.stat-card.stat-words   { border-top-color: var(--yellow); }
.stat-card.stat-money   { border-top-color: var(--black);  }

.stat-icon {
  font-size: 1.8rem;
  display: block;
  margin-bottom: 0.4rem;
  line-height: 1;
}

.stat-value {
  font-size: 2.2rem;
  font-weight: 900;
  line-height: 1.1;
  color: var(--black);
}

.stat-card.stat-books   .stat-value { color: var(--red);   }
.stat-card.stat-reading .stat-value { color: var(--blue);  }
.stat-card.stat-words   .stat-value { color: var(--black); }
.stat-card.stat-money   .stat-value { color: var(--black); }

.stat-label {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 0.3rem;
  color: var(--black);
  opacity: 0.5;
}

/* ── Sponsors ───────────────────────────────────────────── */
.sponsors-section { padding-bottom: 3rem; }

.sponsors-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.sponsor-card {
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: var(--white);
  border: 1.5px solid rgba(17,17,17,0.1);
  border-top: 8px solid var(--black);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.sponsor-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.sponsor-card.grandpa { border-top-color: var(--black); }
.sponsor-card.memere  { border-top-color: var(--yellow); }
.sponsor-card.mum     { border-top-color: var(--red);    }
.sponsor-card.dad     { border-top-color: var(--blue);   }

.sponsor-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.sponsor-emoji { font-size: 1.8rem; }

.sponsor-name {
  font-family: 'Playwrite GB S', serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--black);
}

.sponsor-model {
  font-size: 0.85rem;
  color: var(--black);
  opacity: 0.6;
  line-height: 1.45;
}

.sponsor-model span { display: block; }

.sponsor-total {
  font-size: 2rem;
  font-weight: 900;
  margin-top: 0.25rem;
}

.sponsor-card.grandpa .sponsor-total { color: var(--black);       }
.sponsor-card.memere  .sponsor-total { color: var(--black); }
.sponsor-card.mum     .sponsor-total { color: var(--red);   }
.sponsor-card.dad     .sponsor-total { color: var(--blue);  }

.sponsor-detail {
  font-size: 0.8rem;
  color: var(--black);
  opacity: 0.45;
  font-weight: 700;
}

/* ── Books section ──────────────────────────────────────── */
.books-section { padding-bottom: 2rem; }

.books-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.books-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-btns {
  display: flex;
  gap: 0;
  flex-wrap: wrap;
  border: 2px solid var(--black);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.filter-btn {
  padding: 0.4rem 1rem;
  border-radius: 0;
  border: none;
  border-right: 2px solid var(--black);
  background: var(--white);
  color: var(--black);
  font-family: 'Nunito', sans-serif;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.filter-btn:last-child { border-right: none; }
.filter-btn:hover { background: var(--yellow); color: var(--black); }
.filter-btn.active { background: var(--black); color: var(--white); }

.group-btn {
  padding: 0.4rem 1rem;
  border-radius: var(--radius-sm);
  border: 2px solid var(--black);
  background: var(--white);
  color: var(--black);
  font-family: 'Nunito', sans-serif;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.group-btn:hover { background: var(--blue); color: var(--white); border-color: var(--blue); }
.group-btn.active { background: var(--blue); border-color: var(--blue); color: var(--white); }

.sort-select {
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 2px solid var(--black);
  background: var(--white);
  font-family: 'Nunito', sans-serif;
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--black);
  cursor: pointer;
  outline: none;
}

.sort-select:focus { border-color: var(--red); outline: 2px solid var(--red); outline-offset: 1px; }

.books-count {
  font-size: 0.8rem;
  color: var(--black);
  font-weight: 700;
  opacity: 0.5;
  margin-bottom: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1.25rem;
}

/* ── Series groups ──────────────────────────────────────── */
.books-grid.grouped {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.series-group-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: var(--bw) solid var(--black);
}

.series-group-name {
  font-family: 'Playwrite GB S', Georgia, serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--black);
}

.series-group-count {
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--white);
  background: var(--black);
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.series-group-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1.25rem;
}

/* ── Book card ──────────────────────────────────────────── */
.book-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1.5px solid rgba(17,17,17,0.1);
  display: flex;
  flex-direction: column;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  cursor: pointer;
}

.book-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.book-card.status-to-read { opacity: 0.7; }

/* Cover — proportions based on The Pirate Cat (667 × 1024) */
.book-cover-wrap {
  width: 100%;
  aspect-ratio: 667 / 1024;
  overflow: hidden;
  position: relative;
  background: var(--white);
  flex-shrink: 0;
}

.book-cover-placeholder {
  position: absolute; inset: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  text-align: center;
}

.book-cover-placeholder .ph-initial {
  font-size: 2.8rem;
  font-weight: 900;
  color: rgba(255,255,255,0.9);
  font-family: 'Playwrite GB S', serif;
  line-height: 1;
  margin-bottom: 0.3rem;
}

.book-cover-placeholder .ph-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: rgba(255,255,255,0.85);
  line-height: 1.3;
  word-break: break-word;
}

.book-cover-img {
  position: absolute;
  inset: 10px;
  width: calc(100% - 20px);
  height: calc(100% - 20px);
  object-fit: contain;
  display: block;
}

/* Coloured top accent — cycling primary colours */
.book-body {
  padding: 1.25rem 1.1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
  border-top: 6px solid var(--yellow);
}

.book-card:nth-child(3n+1) .book-body { border-top-color: var(--yellow); }
.book-card:nth-child(3n+2) .book-body { border-top-color: var(--red);    }
.book-card:nth-child(3n+3) .book-body { border-top-color: var(--blue);   }

.book-title {
  font-family: 'Nunito', sans-serif;
  font-size: 1rem;
  font-weight: 800;
  color: var(--black);
  line-height: 1.3;
}

.book-author {
  font-size: 0.82rem;
  color: var(--black);
  font-weight: 600;
  opacity: 0.55;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.book-card-stars {
  color: var(--black);
  font-size: 0.85rem;
  letter-spacing: -0.02em;
  line-height: 1;
  opacity: 0.65;
}

/* ── Book card sponsor chips ────────────────────────────── */
.book-sponsor-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(17,17,17,0.08);
}

.book-sponsor-chip {
  font-size: 0.62rem;
  font-weight: 800;
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.chip-grandpa { background: var(--black);        color: var(--white); }
.chip-memere  { background: var(--yellow);  color: var(--black); }
.chip-mum     { background: var(--red);     color: var(--white); }
.chip-dad     { background: var(--blue);    color: var(--white); }
.chip-total   { background: rgba(17,17,17,0.12); color: var(--black); }

/* ── Modal ──────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(17,17,17,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1.25rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-backdrop.open { opacity: 1; pointer-events: all; }

.modal {
  background: var(--white);
  border-radius: var(--radius);
  max-width: 860px;
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  position: relative;
  display: flex;
  gap: 0;
  box-shadow: 6px 6px 0 var(--black), 0 16px 48px rgba(0,0,0,0.25);
  border: var(--bw) solid var(--black);
  transform: translateY(16px) scale(0.99);
  transition: transform 0.18s ease;
}

.modal-backdrop.open .modal { transform: translateY(0) scale(1); }

.modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-sm);
  border: 2px solid var(--black);
  background: var(--black);
  color: var(--white);
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: background 0.1s, border-color 0.1s;
}

.modal-close:hover { background: var(--red); border-color: var(--red); }

.modal-cover-col {
  width: 260px;
  flex-shrink: 0;
  position: relative;
  align-self: stretch;
  min-height: 520px;
  border-radius: var(--radius) 0 0 var(--radius);
  overflow: hidden;
  background: var(--white);
  border-right: var(--bw) solid var(--black);
}

.modal-cover-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  text-align: center;
  gap: 0.5rem;
}

.modal-ph-initial {
  font-family: 'Playwrite GB S', serif;
  font-size: 4rem;
  font-weight: 700;
  color: rgba(255,255,255,0.9);
  line-height: 1;
}

.modal-ph-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: rgba(255,255,255,0.8);
  line-height: 1.35;
  word-break: break-word;
}

.modal-cover-img {
  position: absolute;
  inset: 20px;
  width: calc(100% - 40px);
  height: calc(100% - 40px);
  object-fit: contain;
  display: none;
  opacity: 0;
  transition: opacity 0.25s ease;
  border-radius: 3px;
}

.modal-cover-img.loaded { display: block; opacity: 1; }

.modal-details {
  flex: 1;
  padding: 2rem 2rem 2rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  min-width: 0;
}

.modal-title {
  font-family: 'Playwrite GB S', serif;
  font-size: 1.9rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--black);
  padding-right: 1.5rem;
}

.modal-top-block {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  border-bottom: 2px solid rgba(17,17,17,0.12);
  padding-bottom: 0.9rem;
}

.modal-top-block .modal-field { border-bottom: none; padding: 0; }

.modal-author { font-size: 0.9rem; font-weight: 700; color: var(--black); opacity: 0.6; }

.modal-field {
  font-size: 0.95rem;
  color: var(--black);
  display: flex;
  gap: 0.75rem;
  align-items: baseline;
  flex-wrap: wrap;
}

.modal-label {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--black);
  opacity: 0.4;
  flex-shrink: 0;
  min-width: 5.5rem;
}

.modal-rating { display: flex; align-items: baseline; gap: 0.3rem; }
.modal-rating-stars { color: var(--black); font-size: 0.95rem; letter-spacing: -0.03em; }
.modal-rating-num   { font-size: 0.95rem; font-weight: 900; color: var(--black); }
.modal-rating-denom { font-size: 0.85rem; color: var(--black); opacity: 0.4; }

.modal-divider { border: none; border-top: 1.5px solid rgba(17,17,17,0.1); margin: 0.25rem 0; }

.modal-meta {
  font-size: 0.95rem;
  color: var(--black);
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.modal-meta > span { display: flex; gap: 0.75rem; align-items: baseline; }

.modal-badges { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-bottom: 0.75rem; }

.modal-sponsor-tiles {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-top: auto;
  border-top: 2px solid rgba(17,17,17,0.12);
  padding-top: 1.5rem;
}

.modal-sponsor-tile {
  flex: 1;
  min-width: 72px;
  padding: 0.9rem 0.75rem;
  border-radius: var(--radius-sm);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  border: 2px solid transparent;
}

.modal-sponsor-tile-name {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.modal-sponsor-tile-amount { font-size: 1.4rem; font-weight: 900; }

.modal-sponsor-tile--grandpa { background: var(--black); border-color: var(--black); }
.modal-sponsor-tile--grandpa .modal-sponsor-tile-name   { color: var(--white); }
.modal-sponsor-tile--grandpa .modal-sponsor-tile-amount { color: var(--white); }

.modal-sponsor-tile--memere { background: var(--yellow); border-color: var(--yellow); }
.modal-sponsor-tile--memere .modal-sponsor-tile-name   { color: var(--black); }
.modal-sponsor-tile--memere .modal-sponsor-tile-amount { color: var(--black); }

.modal-sponsor-tile--mum { background: var(--red); border-color: var(--red); }
.modal-sponsor-tile--mum .modal-sponsor-tile-name   { color: var(--white); }
.modal-sponsor-tile--mum .modal-sponsor-tile-amount { color: var(--white); }

.modal-sponsor-tile--dad { background: var(--blue); border-color: var(--blue); }
.modal-sponsor-tile--dad .modal-sponsor-tile-name   { color: var(--white); }
.modal-sponsor-tile--dad .modal-sponsor-tile-amount { color: var(--white); }

.modal-sponsor-tile--total { background: var(--black); border-color: var(--black); }
.modal-sponsor-tile--total .modal-sponsor-tile-name   { color: var(--white); opacity: 0.6; }
.modal-sponsor-tile--total .modal-sponsor-tile-amount { color: var(--white); }

.modal-notes { font-size: 0.78rem; color: var(--black); opacity: 0.5; font-style: italic; }

@media (max-width: 520px) {
  .modal { flex-direction: column; }
  .modal-cover-col { width: 100%; height: 180px; min-height: unset; border-radius: var(--radius) var(--radius) 0 0; }
  .modal-details { padding: 1.25rem; }
}

/* ── Badges ─────────────────────────────────────────────── */
.book-badges { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.4rem; }

.badge {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.badge-finished  { background: #DDEEFF; color: var(--blue);  }
.badge-reading   { background: #FFEBE6; color: var(--red);   }
.badge-to-read   { background: #EBEBEB; color: #555; }
.badge-new       { background: var(--blue);   color: var(--white); }
.badge-reread    { background: #FFF3CC; color: #7A5000; }
.badge-mum       { background: var(--red);    color: var(--white); }
.badge-format    { background: #F0F0F0; color: #555; }

/* ── Loading / empty ────────────────────────────────────── */
.loading-msg { color: var(--black); opacity: 0.45; font-style: italic; font-size: 0.9rem; padding: 2rem; }

.no-books-msg {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem;
  color: var(--black);
  opacity: 0.4;
  font-style: italic;
}

/* ── Footer ─────────────────────────────────────────────── */
footer {
  background: var(--black);
  color: var(--white);
  text-align: left;
  padding: 2rem;
  font-size: 0.9rem;
  border-top: var(--bw) solid var(--black);
}

footer p { margin-bottom: 0.5rem; opacity: 0.55; }

.footer-admin-link {
  display: inline-block;
  margin-top: 0.5rem;
  color: var(--yellow);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.7;
  transition: opacity 0.12s;
}

.footer-admin-link:hover { opacity: 1; text-decoration: underline; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 900px) {
  .stats-section { grid-template-columns: repeat(2, 1fr); }
  .sponsors-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  :root { --bg-col: min(7vw, 80px); }
}

@media (max-width: 600px) {
  :root { --bg-col: 0px; }
  body  { background-image: none; background-color: var(--white); }
  header {
    background-image: none;
    background-color: var(--yellow);
    border-bottom: var(--bw) solid var(--black);
  }
  .header-content { padding: 2.5rem 1.25rem 3rem 1.5rem; text-align: center; }
  main { width: calc(100% - 1rem); padding: 0 0.5rem 4rem; }
  .sponsors-grid { grid-template-columns: 1fr; }
  .header-book { font-size: 2.5rem; }
  .stats-section { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; margin-top: 1.25rem; }
  .stat-value { font-size: 1.6rem; }
  .books-header { flex-direction: column; }
  .books-controls { width: 100%; }
  .filter-btns { flex-wrap: wrap; }
  .books-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 0.75rem; }
}
