/* Library — adaptive shelves on top of desk tokens */

.chrome-link {
  color: var(--accent);
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.chrome-link:hover { text-decoration: underline; }

.lib { --max: 820px; }

.lib-hero h1 {
  font-size: clamp(28px, 7vw, 40px);
  letter-spacing: -0.03em;
}

.shelf {
  background: rgba(18, 21, 30, 0.72);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(16px, 3.5vw, 22px);
}

.shelf-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: clamp(14px, 3vw, 18px);
}
.shelf-head h2 {
  font-size: clamp(15px, 3.5vw, 17px);
  font-weight: 700;
  letter-spacing: -0.01em;
}
.shelf-tag {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid rgba(94, 224, 181, 0.35);
  padding: 5px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.shelf-tag.pending {
  color: var(--muted);
  border-color: var(--line);
}

.book-card {
  display: grid;
  grid-template-columns: minmax(110px, 38%) 1fr;
  gap: clamp(14px, 3.5vw, 22px);
  align-items: center;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}
@media (max-width: 420px) {
  .book-card {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }
  .book-meta { align-items: center; }
  .book-cta { align-self: center; }
}

.cover-wrap {
  position: relative;
  width: 100%;
  max-width: 220px;
  margin: 0 auto;
  border-radius: 10px;
  overflow: hidden;
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.06);
  aspect-ratio: 3 / 4;
  background: #161922;
  transform: perspective(900px) rotateY(-4deg);
  transition: transform 0.25s ease;
}
.book-card:hover .cover-wrap,
.book-card:focus-visible .cover-wrap {
  transform: perspective(900px) rotateY(0deg) translateY(-3px);
}

.cover {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  -webkit-user-drag: none;
}

.cover-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    115deg,
    transparent 35%,
    rgba(255, 255, 255, 0.12) 48%,
    transparent 60%
  );
  pointer-events: none;
  mix-blend-mode: soft-light;
}

.book-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  align-items: flex-start;
}
.book-kicker {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent2);
  font-weight: 600;
}
.book-meta h3 {
  font-size: clamp(20px, 5vw, 26px);
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.book-blurb {
  color: var(--muted);
  font-size: clamp(12px, 3vw, 14px);
  line-height: 1.45;
}
.book-cta {
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  font-weight: 700;
  color: #06140f;
  background: linear-gradient(145deg, var(--accent), #3ecf9a);
  padding: 10px 14px;
  border-radius: 999px;
  box-shadow: 0 8px 22px rgba(94, 224, 181, 0.28);
}

.pending-shelf { margin-top: 0; }

.pending-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(10px, 2.5vw, 16px);
  margin-bottom: 14px;
}

.ghost-book {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 10px;
  overflow: hidden;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  background:
    repeating-linear-gradient(
      -12deg,
      rgba(255, 255, 255, 0.03),
      rgba(255, 255, 255, 0.03) 8px,
      transparent 8px,
      transparent 16px
    ),
    rgba(10, 12, 18, 0.85);
  display: grid;
  place-items: center;
}
.ghost-spine {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 10px;
  background: linear-gradient(180deg, rgba(122, 162, 255, 0.2), rgba(94, 224, 181, 0.12));
  opacity: 0.55;
}
.ghost-face span {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0.75;
}

.pending-note {
  color: var(--muted);
  font-size: clamp(12px, 3vw, 13.5px);
  line-height: 1.55;
}

.waitlist {
  background:
    linear-gradient(160deg, rgba(122, 162, 255, 0.12), rgba(94, 224, 181, 0.06)),
    rgba(18, 21, 30, 0.9);
  border: 1px solid rgba(122, 162, 255, 0.28);
  border-radius: var(--radius);
  padding: clamp(18px, 4vw, 26px);
  text-align: center;
}
.waitlist-kicker {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent2);
  font-weight: 600;
  margin-bottom: 8px;
}
.waitlist h2 {
  font-size: clamp(18px, 4.5vw, 24px);
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.waitlist-lede {
  color: var(--muted);
  font-size: clamp(12px, 3vw, 14px);
  line-height: 1.5;
  max-width: 36em;
  margin: 0 auto 16px;
}

.wait-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  align-items: stretch;
  max-width: 480px;
  margin: 0 auto;
}
.wait-form input {
  flex: 1 1 200px;
  min-width: 0;
  height: 46px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text);
  padding: 0 14px;
  font-size: 15px;
  outline: none;
  /* allow typing email despite global user-select:none */
  -webkit-user-select: text;
  user-select: text;
}
.wait-form input:focus {
  border-color: rgba(94, 224, 181, 0.5);
  box-shadow: 0 0 0 3px rgba(94, 224, 181, 0.15);
}
.wait-form button {
  flex: 0 0 auto;
  height: 46px;
  padding: 0 18px;
  border: 0;
  border-radius: 12px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  color: #06140f;
  background: linear-gradient(145deg, var(--accent), #3ecf9a);
  box-shadow: 0 8px 22px rgba(94, 224, 181, 0.28);
}
.wait-form button:disabled {
  opacity: 0.65;
  cursor: wait;
}
.wait-status {
  min-height: 1.3em;
  margin-top: 12px;
  font-size: 13px;
  color: var(--accent);
}
.wait-status.err { color: var(--danger); }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@media (max-width: 380px) {
  .pending-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .wait-form button { width: 100%; }
}
