.books-page { background: var(--paper); }
.books-page .site-header { position: fixed; }
.books-page .site-nav a[aria-current="page"] { color: var(--forest-800); background: var(--sage-100); }

.books-hero {
  position: relative;
  overflow: hidden;
  padding: 150px 0 96px;
  background:
    radial-gradient(circle at 8% 18%, rgba(237,174,73,.18), transparent 28%),
    radial-gradient(circle at 92% 70%, rgba(73,125,104,.15), transparent 25%),
    linear-gradient(135deg, var(--cream), var(--sage-50));
}
.books-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(19,56,47,.2), transparent);
}
.books-hero-grid { display: grid; grid-template-columns: 1.04fr .96fr; gap: 76px; align-items: center; }
.back-link { display: inline-flex; gap: 8px; margin-bottom: 30px; color: var(--muted); font-size: .76rem; font-weight: 800; text-decoration: none; }
.back-link:hover, .back-link:focus-visible { color: var(--forest-800); outline: none; }
.books-hero h1 { max-width: 720px; font-size: clamp(3.2rem, 5.5vw, 5.6rem); }
.books-lede { max-width: 690px; margin: 24px 0 0; color: #52665f; font-size: 1.05rem; }
.shop-for { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.shop-for > span { color: var(--muted); font-size: .75rem; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.shop-for-buttons { padding: 4px; display: inline-flex; gap: 4px; background: rgba(255,255,255,.74); border: 1px solid var(--line); border-radius: 12px; }
.shop-for-button { padding: .63rem .82rem; color: var(--muted); background: transparent; border: 0; border-radius: 9px; cursor: pointer; font-size: .77rem; font-weight: 820; }
.shop-for-button:hover, .shop-for-button:focus-visible { color: var(--forest-800); outline: 2px solid rgba(40,98,81,.18); }
.shop-for-button.active { color: #fff; background: var(--forest-800); box-shadow: 0 6px 14px rgba(19,56,47,.16); }
.pain-finder { margin-top: 22px; }
.pain-finder > p { margin: 0 0 9px; color: var(--forest-900); font-family: Georgia, serif; font-size: .96rem; font-weight: 700; }
.pain-options { display: flex; flex-wrap: wrap; gap: 7px; }
.pain-options button { padding: .61rem .75rem; color: #496159; background: #fff; border: 1px solid rgba(19,56,47,.13); border-radius: 999px; cursor: pointer; font-size: .72rem; font-weight: 760; }
.pain-options button:hover, .pain-options button:focus-visible, .pain-options button.active { color: #fff; background: var(--coral); border-color: var(--coral); outline: none; }

.uno-feature { position: relative; min-height: 560px; display: grid; align-content: end; }
.uno-feature::before { content: ""; position: absolute; inset: 5% -8% 8% 7%; background: var(--forest-900); border-radius: 42% 38% 30% 44%; transform: rotate(3deg); box-shadow: 0 32px 70px rgba(13,42,36,.25); }
.uno-photo-wrap { position: absolute; z-index: 2; top: 0; right: 8%; width: 285px; height: 285px; }
.uno-photo-wrap img { position: relative; z-index: 2; width: 100%; height: 100%; object-fit: cover; border: 9px solid #fff; border-radius: 50%; box-shadow: 0 24px 50px rgba(13,42,36,.3); }
.uno-photo-wrap img.is-missing { display: none; }
.uno-photo-wrap::after { content: "UNO"; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; background: linear-gradient(145deg,#73888f,#cbd9d5); border: 9px solid #fff; border-radius: 50%; font-family: Georgia,serif; font-size: 2.8rem; font-weight: 900; letter-spacing: .12em; }
.uno-halo { position: absolute; inset: -18px; border: 2px dashed rgba(237,174,73,.55); border-radius: 50%; animation: slowspin 28s linear infinite; }
@keyframes slowspin { to { transform: rotate(360deg); } }
.real-pet-label { position: absolute; z-index: 3; right: -28px; bottom: 34px; padding: 9px 12px; display: flex; align-items: center; gap: 7px; color: var(--forest-900); background: #fff; border-radius: 999px; box-shadow: 0 10px 24px rgba(13,42,36,.22); font-size: .71rem; font-weight: 850; }
.real-pet-label i { width: 8px; height: 8px; background: var(--coral); border-radius: 50%; }
.uno-feature-copy { position: relative; z-index: 1; padding: 255px 42px 37px; color: #fff; }
.release-pill { padding: 6px 9px; color: var(--forest-950); background: var(--gold-light); border-radius: 999px; font-size: .64rem; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; }
.book-number { margin: 16px 0 4px; color: rgba(255,255,255,.55); font-size: .62rem; font-weight: 850; letter-spacing: .12em; }
.uno-feature h2 { font-size: 2.8rem; }
.uno-feature-copy > p:not(.book-number) { margin: 12px 0 0; color: rgba(255,255,255,.69); font-size: .86rem; }
.mini-topics { margin: 17px 0 20px; display: flex; flex-wrap: wrap; gap: 6px; }
.mini-topics span { padding: 5px 8px; color: var(--gold-light); border: 1px solid rgba(255,217,141,.32); border-radius: 999px; font-size: .62rem; font-weight: 800; }
.uno-feature .button { min-height: 46px; padding: .7rem 1rem; color: var(--forest-950); background: #fff; box-shadow: none; }

.story-shop { background: #fff; }
.story-heading { display: grid; grid-template-columns: 1fr .74fr; gap: 70px; align-items: end; }
.story-heading h2, .bundle-heading h2 { font-size: clamp(2.6rem, 4.5vw, 4.1rem); }
.competency-note { padding: 18px; display: flex; gap: 13px; align-items: flex-start; background: var(--sage-50); border: 1px solid var(--line); border-radius: 16px; }
.competency-mark { flex: 0 0 auto; width: 31px; height: 31px; display: grid; place-items: center; color: #fff; background: var(--forest-700); border-radius: 50%; font-weight: 900; }
.competency-note p { margin: 0; color: var(--muted); font-size: .78rem; line-height: 1.45; }
.competency-note strong { display: block; color: var(--forest-900); }
.story-filters { margin-top: 44px; padding: 8px; display: flex; flex-wrap: wrap; gap: 6px; background: var(--sage-50); border: 1px solid var(--line); border-radius: 15px; }
.story-filter { padding: .7rem .86rem; color: var(--muted); background: transparent; border: 0; border-radius: 10px; cursor: pointer; font-size: .76rem; font-weight: 800; }
.story-filter:hover, .story-filter:focus-visible { color: var(--forest-800); outline: 2px solid rgba(40,98,81,.18); }
.story-filter.active { color: #fff; background: var(--forest-800); }
.result-status { margin: 18px 0 20px; color: var(--muted); font-size: .73rem; font-weight: 750; }
.book-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.book-card { overflow: hidden; display: grid; grid-template-columns: 42% 58%; min-height: 355px; background: var(--paper); border: 1px solid rgba(19,56,47,.11); border-radius: 22px; box-shadow: 0 12px 34px rgba(13,42,36,.06); transition: transform .23s ease, box-shadow .23s ease; }
.book-card:hover { transform: translateY(-4px); box-shadow: 0 20px 42px rgba(13,42,36,.12); }
.book-card[hidden] { display: none; }
.book-cover { position: relative; min-height: 100%; display: grid; place-items: center; overflow: hidden; background: linear-gradient(145deg, #dce9df, #f2dba9); }
.book-cover::before { content: "Forest of Friends"; position: absolute; inset: 16px; display: grid; place-items: center; color: var(--forest-900); font-family: Georgia,serif; text-align: center; border: 1px solid rgba(19,56,47,.14); border-radius: 12px; }
.book-cover img { position: relative; z-index: 1; width: 100%; height: 100%; padding: 17px 9px; object-fit: contain; filter: drop-shadow(0 12px 13px rgba(13,42,36,.2)); }
.book-cover img.is-missing { display: none; }
.book-cover > span { position: absolute; z-index: 2; left: 9px; bottom: 9px; padding: 5px 7px; color: #fff; background: rgba(13,42,36,.84); border-radius: 7px; font-size: .57rem; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.tone-memory { background: linear-gradient(145deg,#f4d7bd,#dfc3c6); }
.tone-tuffie { background: linear-gradient(145deg,#d4c1aa,#e7a778); }
.tone-tank, .tone-tankday { background: linear-gradient(145deg,#9fb3ad,#dce4dc); }
.tone-jj { background: linear-gradient(145deg,#dae7ed,#f6dcb3); }
.tone-visitor { background: linear-gradient(145deg,#c6d8c7,#e9c9ae); }
.tone-detective { background: linear-gradient(145deg,#b8cccf,#e7d2a8); }
.tone-activity { background: linear-gradient(145deg,#f2ca92,#da9e7c); }
.tone-uno { background: linear-gradient(145deg,#cbd7dc,#eef2ec); }
.tone-law { background: linear-gradient(145deg,#d7c8a6,#8b6f54); }
.book-card-body { padding: 20px 18px; display: flex; flex-direction: column; }
.book-meta { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: .64rem; font-weight: 800; }
.book-meta strong { color: var(--forest-800); }
.book-card h3 { margin-top: 12px; font-size: 1.36rem; line-height: 1.08; }
.need-line { margin: 11px 0 0; color: #3b574d; font-size: .78rem; font-weight: 760; line-height: 1.42; }
.use-note { margin: 9px 0 17px; color: var(--muted); font-size: .72rem; line-height: 1.43; }
.book-card-body > a { margin-top: auto; display: inline-flex; align-items: center; justify-content: space-between; color: var(--forest-800); font-size: .75rem; font-weight: 880; text-decoration: none; border-top: 1px solid var(--line); padding-top: 12px; }
.book-card-body > a:hover, .book-card-body > a:focus-visible { color: var(--coral); outline: none; }
.companion-card { border-color: rgba(217,109,85,.25); }
.empty-state { padding: 50px; text-align: center; background: var(--sage-50); border-radius: 18px; }
.empty-state p { margin: 5px 0 12px; color: var(--muted); }
.empty-state button { padding: .7rem 1rem; color: #fff; background: var(--forest-800); border: 0; border-radius: 10px; cursor: pointer; font-weight: 800; }

.jj-legacy { background: linear-gradient(135deg, #fff9ef 0%, #f5e3d0 100%); }
.jj-legacy-grid { display: grid; grid-template-columns: minmax(260px, .72fr) 1.28fr; gap: clamp(38px, 7vw, 90px); align-items: center; }
.jj-legacy-image { overflow: hidden; max-width: 430px; border: 8px solid #fff; border-radius: 28px; box-shadow: 0 24px 60px rgba(83,35,31,.18); }
.jj-legacy-image img { display: block; width: 100%; height: auto; }
.jj-legacy-copy { max-width: 670px; }
.jj-legacy-copy h2 { max-width: 620px; font-size: clamp(2.7rem, 5vw, 4.8rem); line-height: .98; }
.jj-legacy-copy > p:not(.eyebrow):not(.jj-signoff) { margin: 24px 0 0; color: #5b5148; font-size: 1.02rem; line-height: 1.72; }
.jj-legacy-copy .jj-signoff { margin: 20px 0 26px; color: #7a2930; font-family: Georgia, serif; font-size: 1.25rem; font-style: italic; }

.bundle-shop { color: #fff; background: var(--forest-950); }
.bundle-heading { display: grid; grid-template-columns: 1.1fr .9fr; gap: 75px; align-items: end; }
.bundle-heading > p { margin: 0 0 5px; color: rgba(255,255,255,.62); }
.bundle-grid { margin-top: 50px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; }
.bundle-card { position: relative; padding: 23px; display: flex; flex-direction: column; min-height: 390px; background: rgba(255,255,255,.055); border: 1px solid rgba(255,255,255,.12); border-radius: 22px; }
.bundle-card:hover { background: rgba(255,255,255,.085); }
.bundle-featured { background: var(--forest-800); border-color: rgba(255,217,141,.48); }
.bundle-badge { position: absolute; right: 13px; top: 13px; padding: 5px 8px; color: var(--forest-950); background: var(--gold-light); border-radius: 999px; font-size: .52rem; font-weight: 900; text-transform: uppercase; }
.bundle-cover { width: 100%; margin: 7px 0 22px; overflow: hidden; border-radius: 14px; background: rgba(255,255,255,.08); box-shadow: 0 10px 24px rgba(0,0,0,.22); }
.bundle-cover img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.bundle-kicker { margin: 0 0 7px; color: var(--gold-light); font-size: .58rem; font-weight: 900; letter-spacing: .1em; }
.bundle-card h3 { font-size: 1.5rem; line-height: 1.08; }
.bundle-card > p:not(.bundle-kicker) { margin: 12px 0 0; color: rgba(255,255,255,.62); font-size: .77rem; }
.bundle-includes { margin-top: auto; padding-top: 18px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.bundle-includes span { padding: 4px 7px; color: rgba(255,255,255,.68); border: 1px solid rgba(255,255,255,.15); border-radius: 999px; font-size: .57rem; }
.bundle-includes strong { margin-left: auto; color: #fff; font-size: .86rem; }
.bundle-card > a { margin-top: 13px; padding-top: 12px; display: flex; justify-content: space-between; color: var(--gold-light); border-top: 1px solid rgba(255,255,255,.1); font-size: .74rem; font-weight: 850; text-decoration: none; }
.bundle-card > a:hover, .bundle-card > a:focus-visible { color: #fff; outline: none; }
.classroom-band { margin-top: 70px; padding: 28px 32px; display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: center; color: var(--ink); background: var(--cream); border-radius: 22px; }
.classroom-icon { width: 60px; height: 60px; display: grid; place-items: center; color: #fff; background: var(--coral); border-radius: 18px; font-family: Georgia,serif; font-size: 1.25rem; font-weight: 900; transform: rotate(-3deg); }
.classroom-band p { margin: 0; color: var(--coral); font-size: .59rem; font-weight: 900; letter-spacing: .1em; }
.classroom-band h3 { margin-top: 3px; font-size: 1.45rem; }
.classroom-band div > span { color: var(--muted); font-size: .75rem; }
.classroom-actions { display: grid; gap: 8px; text-align: center; }
.classroom-actions .button { min-height: 47px; }
.classroom-actions > a:last-child { color: var(--forest-800); font-size: .7rem; font-weight: 850; }

@media (max-width: 1080px) {
  .books-hero-grid { gap: 42px; }
  .uno-feature { min-height: 520px; }
  .uno-photo-wrap { width: 235px; height: 235px; }
  .uno-feature-copy { padding: 225px 28px 30px; }
  .book-grid { grid-template-columns: repeat(2, 1fr); }
  .bundle-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 820px) {
  .books-hero { padding: 128px 0 72px; }
  .books-hero-grid, .story-heading, .bundle-heading { grid-template-columns: 1fr; gap: 34px; }
  .uno-feature { width: min(520px,100%); margin: 0 auto; }
  .uno-photo-wrap { right: 10%; }
  .story-heading { align-items: start; }
  .competency-note { max-width: 560px; }
  .jj-legacy-grid { grid-template-columns: 1fr; }
  .jj-legacy-image { width: min(390px, 100%); margin: 0 auto; }
  .jj-legacy-copy { text-align: center; }
  .jj-legacy-copy .eyebrow { justify-content: center; }
  .classroom-band { grid-template-columns: auto 1fr; }
  .classroom-actions { grid-column: 1 / -1; width: min(340px,100%); }
}
@media (max-width: 590px) {
  .books-hero h1 { font-size: clamp(3rem,14.5vw,4.2rem); }
  .shop-for { display: grid; }
  .shop-for-buttons { display: grid; grid-template-columns: 1fr 1fr; }
  .pain-options { display: grid; grid-template-columns: 1fr 1fr; }
  .pain-options button { border-radius: 11px; }
  .uno-feature { min-height: 500px; }
  .uno-feature::before { inset: 8% 0 0; }
  .uno-photo-wrap { right: 50%; width: 210px; height: 210px; transform: translateX(50%); }
  .real-pet-label { right: -10px; }
  .uno-feature-copy { padding: 225px 23px 27px; }
  .story-filters { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .story-filter { flex: 0 0 auto; }
  .book-grid { grid-template-columns: 1fr; }
  .book-card { grid-template-columns: 39% 61%; min-height: 330px; }
  .bundle-grid { grid-template-columns: 1fr; }
  .bundle-card { min-height: 340px; }
  .classroom-band { padding: 24px; grid-template-columns: 1fr; text-align: center; }
  .classroom-icon { margin: 0 auto; }
  .classroom-actions { width: 100%; }
}
@media (max-width: 390px) {
  .pain-options { grid-template-columns: 1fr; }
  .book-card { grid-template-columns: 1fr; }
  .book-cover { min-height: 260px; }
}
