:root {
  --paper: #fbf4e9;
  --paper-2: #f4e8d6;
  --ink: #1d1830;
  --ink-soft: #5b5470;
  --line: #e4d6c1;
  --pink: #ff4f9a;
  --orange: #ff8a3d;
  --yellow: #ffcf3f;
  --green: #2fbf71;
  --blue: #2d6cdf;
  --purple: #8c52ff;
  --wood: #b07a4f;
  --wood-dark: #7a4a2a;
  --wood-light: #cf9a6c;
  --radius: 18px;
  --shadow: 0 1px 0 rgba(29, 24, 48, .06), 0 12px 32px -12px rgba(29, 24, 48, .25);
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "DM Sans", system-ui, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.05; margin: 0; }

.pride-stripe {
  height: 8px;
  background: linear-gradient(90deg,
    #e40303 0 16.66%, #ff8c00 0 33.33%, #ffd23f 0 50%,
    #2fbf71 0 66.66%, #2d6cdf 0 83.33%, #8c52ff 0);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 0 20px 40px;
  background:
    radial-gradient(circle at 12% 30%, rgba(255, 79, 154, .16), transparent 38%),
    radial-gradient(circle at 88% 20%, rgba(140, 82, 255, .14), transparent 36%),
    radial-gradient(circle at 70% 95%, rgba(255, 207, 63, .22), transparent 40%);
}
.nav {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
}
.nav-logo {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 20px;
  letter-spacing: .04em;
  text-decoration: none;
}
.nav-links { display: flex; gap: 22px; }
.nav-links a {
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  color: var(--ink-soft);
}
.nav-links a:hover { color: var(--ink); }

.hero-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding-top: 28px;
  text-align: center;
}
.eyebrow {
  display: inline-block;
  margin: 0 0 14px;
  padding: 6px 14px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.title {
  font-weight: 900;
  font-size: clamp(48px, 10vw, 118px);
  line-height: .95;
  letter-spacing: -.02em;
  font-variation-settings: "SOFT" 100, "WONK" 1;
}
.t-line { display: block; }
.t-queer {
  font-style: italic;
  font-size: 1.12em;
  line-height: 1;
  padding: .02em 0 .08em;
}
.t-queer span {
  display: inline-block;
  animation: bob 3.2s ease-in-out infinite;
}
.t-queer span:nth-child(1) { color: var(--pink); animation-delay: 0s; }
.t-queer span:nth-child(2) { color: var(--orange); animation-delay: .12s; }
.t-queer span:nth-child(3) { color: #e8b400; animation-delay: .24s; }
.t-queer span:nth-child(4) { color: var(--green); animation-delay: .36s; }
.t-queer span:nth-child(5) { color: var(--purple); animation-delay: .48s; }
@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-.06em) rotate(-3deg); }
}
.lede {
  max-width: 620px;
  margin: 18px auto 0;
  font-size: 19px;
  color: var(--ink-soft);
}

/* ---------- Shared ---------- */
main > section {
  max-width: 1120px;
  margin: 0 auto;
  padding: 56px 20px;
}
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 18px;
  margin-bottom: 28px;
}
.section-head h2 { font-size: clamp(32px, 5vw, 48px); font-weight: 800; }
.section-head p { margin: 0; color: var(--ink-soft); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: 700 15px var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 3px 3px 0 var(--ink); }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { box-shadow: 3px 3px 0 var(--pink); }
.btn:disabled { opacity: .35; pointer-events: none; }

/* ---------- Next meeting ---------- */
.next { padding-top: 8px !important; }
.next-card {
  display: grid;
  grid-template-columns: minmax(180px, 280px) 1fr;
  gap: 44px;
  align-items: center;
  padding: 40px;
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 28px;
  box-shadow: 10px 10px 0 var(--ink);
}
.next-cover .cover {
  transform: rotate(-3deg);
  box-shadow: 0 20px 40px -12px rgba(0, 0, 0, .45);
  transition: transform .3s;
}
.next-cover .cover:hover { transform: rotate(0) scale(1.03); }
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--pink);
}
.pulse {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--pink);
  box-shadow: 0 0 0 0 rgba(255, 79, 154, .6);
  animation: pulse 1.8s infinite;
}
@keyframes pulse {
  70% { box-shadow: 0 0 0 12px rgba(255, 79, 154, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 79, 154, 0); }
}
.next-title { font-size: clamp(36px, 5.5vw, 60px); font-weight: 800; }
.next-author { margin: 8px 0 0; font-size: 20px; color: var(--ink-soft); }
.next-date {
  display: inline-block;
  margin: 18px 0 0;
  padding: 6px 14px;
  background: var(--yellow);
  border-radius: 8px;
  font-weight: 800;
  font-size: 18px;
  transform: rotate(-1deg);
}
.next-times { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-top: 20px; }
.next-times p { display: flex; align-items: baseline; gap: 8px; margin: 0; font-weight: 700; }
.next-times time { font-family: var(--font-display); font-size: 34px; font-weight: 800; line-height: 1; }
.next-details { margin: 12px 0 0; color: var(--ink-soft); }
.next-details strong { color: var(--ink); }
.next-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

/* Add-to-calendar dropdown */
.cal-menu { position: relative; display: inline-block; }
.cal-menu summary { list-style: none; }
.cal-menu summary::-webkit-details-marker { display: none; }
.cal-menu summary.btn::after {
  content: "";
  width: 7px; height: 7px;
  margin: -4px 0 0 2px;
  border: solid currentColor;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  transition: transform .15s;
}
.cal-menu[open] summary.btn::after { transform: translateY(4px) rotate(-135deg); }
.cal-options {
  position: absolute;
  z-index: 20;
  top: calc(100% + 8px);
  left: 0;
  display: flex;
  flex-direction: column;
  min-width: 210px;
  padding: 6px;
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 14px;
  box-shadow: 5px 5px 0 var(--ink);
}
.cal-options a {
  padding: 9px 12px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  white-space: nowrap;
}
.cal-options a:hover, .cal-options a:focus-visible { background: var(--paper-2); outline: none; }

/* ---------- Covers (real or generated) ---------- */
.cover {
  position: relative;
  aspect-ratio: 2 / 3;
  width: 100%;
  border-radius: 3px 8px 8px 3px;
  overflow: hidden;
  background: var(--c, #444);
}
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover::after {  /* page-edge sheen */
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(0,0,0,.25) 0, rgba(255,255,255,.18) 3%, transparent 7%);
  pointer-events: none;
}
.cover.fake {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 14% 12%;
  color: var(--fg, #fff);
  background:
    radial-gradient(circle at 80% 20%, rgba(255,255,255,.22), transparent 45%),
    var(--c);
}
.cover.fake .fk-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(16px, 2.2vw, 30px);
  line-height: 1.05;
}
.cover.fake .fk-author {
  font-size: clamp(11px, 1vw, 14px);
  letter-spacing: .1em;
  text-transform: uppercase;
  font-weight: 700;
}

/* ---------- Upcoming ledge ---------- */
.ledge-wrap {
  margin: 0 -20px;
  padding: 0 20px;
  overflow-x: auto;
  scrollbar-width: thin;
}
.ledge {
  list-style: none;
  display: flex;
  gap: 26px;
  margin: 0;
  padding: 10px 4px 0;
  min-width: min-content;
  position: relative;
}
.ledge::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 58px;
  height: 14px;
  background: linear-gradient(var(--wood-light), var(--wood) 60%, var(--wood-dark));
  border-radius: 3px;
  box-shadow: 0 10px 14px -6px rgba(0,0,0,.35);
  z-index: 0;
}
.ledge li {
  width: 150px;
  flex: none;
  position: relative;
  z-index: 1;
}
.ledge button {
  all: unset;
  display: block;
  width: 100%;
  cursor: pointer;
}
.ledge .cover {
  box-shadow: 0 14px 20px -12px rgba(0,0,0,.55);
  transition: transform .25s;
  transform-origin: bottom center;
}
.ledge button:hover .cover,
.ledge button:focus-visible .cover { transform: translateY(-8px) rotate(-2deg); }
.ledge button:focus-visible { outline: 3px solid var(--purple); outline-offset: 6px; border-radius: 6px; }
.ledge .when {
  margin-top: 24px;
  height: 48px;
  font-size: 14px;
  line-height: 1.3;
}
.ledge .when strong { display: block; font-size: 15px; }
.ledge .when span { color: var(--ink-soft); }

/* ---------- Bookcase ---------- */
.shelf-controls {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.view-toggle {
  display: inline-flex;
  padding: 4px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: #fff;
}
.view-toggle button {
  border: 0;
  background: transparent;
  padding: 7px 16px;
  border-radius: 999px;
  font: 700 14px var(--font-body);
  color: var(--ink);
  cursor: pointer;
}
.view-toggle button.active { background: var(--ink); color: var(--paper); }

.bookcase {
  --spine-row: 280px;
  --plank: 22px;
  position: relative;
  padding: 26px 26px 8px;
  background:
    linear-gradient(90deg, rgba(0,0,0,.18), transparent 6%, transparent 94%, rgba(0,0,0,.18)),
    #5a3620;
  border: 14px solid var(--wood-dark);
  border-bottom-width: 22px;
  border-radius: 10px;
  box-shadow: var(--shadow), inset 0 0 40px rgba(0,0,0,.5);
}
.shelf-year {
  display: inline-block;
  margin: 0 0 10px;
  padding: 3px 12px 4px;
  background: var(--paper);
  border-radius: 4px;
  font: 800 14px var(--font-body);
  letter-spacing: .08em;
  box-shadow: 0 2px 0 rgba(0,0,0,.25);
  transform: rotate(-1.5deg);
}
.shelf {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  row-gap: var(--plank);
  margin: 0 -26px 26px;
  padding: 0 26px var(--plank);
  background: repeating-linear-gradient(
    to bottom,
    transparent 0 var(--spine-row),
    var(--wood-light) var(--spine-row) calc(var(--spine-row) + 4px),
    var(--wood) calc(var(--spine-row) + 4px) calc(var(--spine-row) + var(--plank) - 5px),
    var(--wood-dark) calc(var(--spine-row) + var(--plank) - 5px) calc(var(--spine-row) + var(--plank))
  );
}
.slot {
  height: var(--spine-row);
  display: flex;
  align-items: flex-end;
  position: relative;
}
.spine {
  --h: 230px;
  --w: 44px;
  position: relative;
  width: calc(var(--w) * var(--k, 1));
  height: calc(var(--h) * var(--k, 1));
  margin: 0 1px;
  padding: 14px 0;
  border: 0;
  border-radius: 3px 3px 1px 1px;
  background:
    linear-gradient(90deg, rgba(0,0,0,.28), rgba(255,255,255,.14) 22%, transparent 45%, rgba(0,0,0,.18)),
    var(--c);
  color: var(--fg);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-origin: bottom center;
  transition: transform .22s cubic-bezier(.3, 1.6, .5, 1);
  box-shadow: inset 0 -2px 0 rgba(0,0,0,.25);
}
.spine::before, .spine::after {  /* little decorative bands */
  content: "";
  position: absolute;
  left: 5px; right: 5px;
  height: 2px;
  background: currentColor;
  opacity: .45;
}
.spine::before { top: 8px; }
.spine::after { bottom: 8px; }
.spine.lean { transform: rotate(4deg); margin-left: 8px; }
.spine:hover, .spine:focus-visible {
  transform: translateY(-16px);
  z-index: 3;
}
.spine:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
.spine-text {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  display: flex;
  align-items: center;
  gap: 10px;
  max-height: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.spine-title {
  font-weight: 700;
  font-size: 13.5px;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}
.spine-author {
  font-size: 10px;
  letter-spacing: .06em;
  text-transform: uppercase;
  opacity: .8;
}
.spine.long .spine-title { font-size: 12px; }
.spine.long.f-serif .spine-title { font-size: 13px; }
.spine.long .spine-author { display: none; }
.spine.f-serif .spine-title { font-family: var(--font-display); font-size: 15px; }
.spine.f-condensed .spine-title { font-family: "Oswald", sans-serif; text-transform: uppercase; font-size: 14px; letter-spacing: .03em; }
.spine.f-sans .spine-title { font-family: var(--font-body); font-weight: 800; }

/* Cover peek on hover */
.peek {
  position: absolute;
  bottom: calc(100% + 26px);
  left: 50%;
  width: 130px;
  translate: -50% 0;
  opacity: 0;
  scale: .85;
  transition: opacity .18s, scale .18s;
  pointer-events: none;
  z-index: 10;
}
.peek .cover { box-shadow: 0 16px 30px -8px rgba(0,0,0,.6); }
.slot:hover .peek, .slot:has(:focus-visible) .peek { opacity: 1; scale: 1; }

/* Shelf knick-knacks */
.bookend {
  width: 42px;
  height: 120px;
  margin-left: 10px;
  align-self: flex-end;
  flex: none;
}
.plant { width: 64px; height: 110px; margin-left: 14px; flex: none; }

/* Cover wall */
.cover-wall {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 22px 18px;
}
.cover-wall button {
  all: unset;
  cursor: pointer;
  display: block;
}
.cover-wall .cover {
  box-shadow: 0 10px 20px -10px rgba(0,0,0,.5);
  transition: transform .2s;
}
.cover-wall button:hover .cover,
.cover-wall button:focus-visible .cover { transform: translateY(-4px) rotate(-1.5deg); }
.cover-wall button:focus-visible { outline: 3px solid var(--purple); outline-offset: 4px; border-radius: 6px; }
.cover-wall .cw-group {
  grid-column: 1 / -1;
  margin: 14px 0 -6px;
  font-size: 24px;
  font-weight: 800;
}
.cover-wall .cw-group:first-child { margin-top: 0; }
.cover-wall .cw-month {
  margin-top: 8px;
  font-size: 13px;
  color: var(--ink-soft);
  font-weight: 600;
}

/* ---------- Search ---------- */
.search-box {
  position: relative;
  max-width: 560px;
}
.search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  width: 20px;
  height: 20px;
  transform: translateY(-50%);
  color: var(--ink-soft);
  pointer-events: none;
}
.search-box input {
  width: 100%;
  padding: 14px 20px 14px 50px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font: 500 17px var(--font-body);
  transition: box-shadow .15s;
}
.search-box input::placeholder { color: var(--ink-soft); opacity: .8; }
.search-box input:focus { outline: none; box-shadow: 4px 4px 0 var(--purple); }
.search-status {
  margin: 14px 0 0;
  min-height: 1.4em;
  color: var(--ink-soft);
  font-weight: 600;
}
.search-results:not(:empty) { margin-top: 18px; }
.cover-wall .cw-month.soon { color: var(--ink); font-weight: 800; }

/* ---------- Visit ---------- */
.evening {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 0;
  padding: 0;
  list-style: none;
}
.evening li {
  position: relative;
  padding: 26px 24px 0 0;
  border-top: 3px solid var(--ink);
}
.evening li::before {
  content: "";
  position: absolute;
  top: -11px;
  left: 0;
  width: 13px;
  height: 13px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: var(--c);
}
.evening time {
  display: block;
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 800;
  line-height: 1;
}
.evening strong { display: block; margin-top: 10px; font-size: 19px; }
.evening span { display: block; margin-top: 2px; color: var(--ink-soft); }

.partners {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
  margin-top: 48px;
}
.partner {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 18px 22px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 5px 5px 0 var(--c);
  text-decoration: none;
  transition: transform .15s, box-shadow .15s;
}
.partner:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--c); }
.partner img { flex: none; width: 128px; height: 80px; object-fit: contain; }
.partner span { font-size: 15px; color: var(--ink-soft); }
.partner strong { color: var(--ink); }
.partner em {
  display: block;
  margin-top: 6px;
  color: var(--ink);
  font-style: normal;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.contact { margin: 32px 0 0; color: var(--ink-soft); }
.contact a {
  color: var(--ink);
  font-weight: 700;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

/* ---------- Footer ---------- */
.footer {
  margin-top: 40px;
  padding-bottom: 32px;
  text-align: center;
  background: var(--ink);
  color: var(--paper);
}
.footer p { margin: 24px 20px 0; font-weight: 600; }
.footer a { overflow-wrap: anywhere; }
.footer .small { margin-top: 6px; font-weight: 400; font-size: 13px; opacity: .7; }

/* ---------- Modal ---------- */
.book-modal {
  width: min(760px, calc(100vw - 32px));
  padding: 32px;
  border: 2px solid var(--ink);
  border-radius: 24px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 10px 10px 0 var(--c, var(--pink));
}
.book-modal[open] {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 32px;
  align-items: center;
  animation: pop .28s cubic-bezier(.3, 1.4, .5, 1);
}
.book-modal::backdrop { background: rgba(29, 24, 48, .55); backdrop-filter: blur(3px); }
@keyframes pop { from { opacity: 0; transform: scale(.92) translateY(10px); } }
.modal-close {
  position: absolute;
  top: 12px; right: 14px;
  width: 38px; height: 38px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: var(--ink);
}
.modal-close:hover { background: var(--paper-2); }
.modal-cover .cover { box-shadow: 0 18px 36px -12px rgba(0,0,0,.5); }
.modal-when {
  display: inline-block;
  margin: 0 0 14px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--c);
  color: var(--fg);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.modal-title { font-size: clamp(28px, 4vw, 40px); font-weight: 800; }
.modal-subtitle { margin: 6px 0 0; font-family: var(--font-display); font-style: italic; font-size: 19px; }
.modal-subtitle:empty, .modal-note:empty, .modal-genre:empty { display: none; }
.modal-author { margin: 10px 0 0; font-size: 18px; color: var(--ink-soft); }
.modal-genre {
  margin: 8px 0 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.modal-note { margin: 14px 0 0; font-size: 15px; }
.modal-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.modal-links .btn { padding: 8px 14px; font-size: 14px; }
.modal-nav { display: flex; gap: 10px; margin-top: 26px; }
.modal-nav .btn { padding: 8px 14px; font-size: 14px; }

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .next-card { grid-template-columns: 1fr; padding: 28px 22px; gap: 28px; box-shadow: 6px 6px 0 var(--ink); }
  .next-cover { max-width: 200px; margin: 0 auto; }
  .evening { grid-template-columns: 1fr; gap: 28px; margin-left: 8px; border-left: 3px solid var(--ink); }
  .evening li { padding: 0 0 0 26px; border-top: 0; }
  .evening li::before { top: 10px; left: -11px; }
  .evening time { font-size: 36px; }
  .partners { grid-template-columns: 1fr; margin-top: 36px; }
  .book-modal[open] { grid-template-columns: 1fr; padding: 26px 22px; gap: 20px; }
  .modal-cover { max-width: 170px; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .nav-links { gap: 14px; }
  .nav-links a { font-size: 14px; }
  .hero-inner { padding-top: 16px; }
  .bookcase { --spine-row: 230px; padding: 20px 14px 4px; border-width: 10px; border-bottom-width: 16px; }
  .shelf { margin: 0 -14px 20px; padding: 0 14px var(--plank); }
  .bookcase { --k: .8; }
  .peek { display: none; }
  .shelf-controls { margin-left: 0; }
  .partner { gap: 16px; padding: 16px 18px; }
  .partner img { width: 88px; height: 60px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
