/* TuckJoy's books: the shelf at /books and a book's page at /b/{slug} (lib/our-books-page.js),
   inside the site's shell, on design.css's tokens. */
.ob{max-width:1200px;margin:0 auto;padding:20px 24px 72px}

/* The hero: TuckJoy's picture of its own characters, the words on its open sky at the left.
   The sky stays light in dark mode too, so its words keep the logo's navy. */
.ob-hero{position:relative;border-radius:var(--r-card);overflow:hidden;background:#cfe6f2;height:clamp(240px,26vw,330px)}
.ob-hero .art{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:right 40%;display:block}
.ob-hero .say{position:relative;max-width:44%;height:100%;box-sizing:border-box;padding:28px 0 28px 40px;display:flex;flex-direction:column;justify-content:center;align-items:flex-start;gap:12px;color:var(--navy)}
.ob-hero h1{font:600 clamp(34px,3.6vw,52px)/1.05 var(--display);letter-spacing:-.02em}
.ob-hero p{font-size:18px;line-height:1.45;max-width:22em}
.ob-hero .btn{margin-top:4px}

/* The characters: one row that scrolls sideways, each with how many books they are in. */
.ob-who{display:flex;gap:10px;overflow-x:auto;padding:18px 2px 14px;margin:0 0 12px;scrollbar-width:thin;scroll-snap-type:x proximity}
.ob-who a{flex:0 0 auto;scroll-snap-align:start;display:flex;align-items:center;gap:10px;min-height:52px;padding:5px 16px 5px 5px;border:1px solid var(--line);border-radius:var(--r-pill);background:var(--surface);color:var(--ink);text-decoration:none;font-weight:600;line-height:1.15}
.ob-who a:hover{border-color:var(--line-strong)}
.ob-who a.on{border-color:var(--accent);box-shadow:0 0 0 2px var(--accent) inset}
.ob-who a.all{padding-left:18px}
.ob-who img{width:42px;height:42px;border-radius:50%;object-fit:cover;background:var(--sunk)}
.ob-who small{display:block;font-weight:400;color:var(--muted);font-size:13px}
.ob-by{font:600 26px/1.2 var(--display);margin:4px 0 18px}

/* The covers. */
.ob-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:28px 22px}
.ob-book{color:var(--ink);text-decoration:none;display:flex;flex-direction:column;gap:8px;min-width:0}
/* A cover keeps its own shape (the book's trim): a set box would crop the title the one writer
   set on it. Only the stand-in for a book not drawn yet has a shape of its own. */
.ob-book .cv,.ob-one .cv{border-radius:8px;overflow:hidden;background:var(--sunk);box-shadow:0 10px 24px rgba(28,36,38,.16)}
.ob .cv .none{display:flex;align-items:center;justify-content:center;aspect-ratio:3/4;padding:12px;box-sizing:border-box;text-align:center;font-weight:600}
.ob .cv img{width:100%;height:auto;display:block}
.ob-book .cv{transition:transform .15s}
.ob-book:hover .cv,.ob-book:focus-visible .cv{transform:translateY(-3px)}
.ob-book h3{font:600 17px/1.25 var(--display);margin:4px 0 0}
.ob-book p{color:var(--muted);font-size:14px;line-height:1.45;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.ob-faces{display:flex;gap:2px;align-items:center;flex-wrap:wrap}
.ob-faces img{width:26px;height:26px;border-radius:50%;object-fit:cover;border:2px solid var(--paper);background:var(--sunk);margin-right:-6px}
.ob-faces .ob-meta{margin-left:12px}
.ob-meta{font-size:13px;color:var(--muted)}
.ob-foot{margin-top:56px;text-align:center;display:flex;flex-direction:column;align-items:center;gap:8px}
.ob-foot small{color:var(--muted)}
.ob-empty{color:var(--muted);padding:24px 0}

/* A book's page. */
.ob-back{display:inline-flex;align-items:center;min-height:44px;color:var(--muted);text-decoration:none;font-weight:600}
.ob-back:hover{color:var(--ink)}
.ob-one{display:grid;grid-template-columns:minmax(260px,400px) 1fr;gap:48px;align-items:start;margin:8px 0 24px}
.ob-one .about{display:flex;flex-direction:column;align-items:flex-start;gap:14px;padding-top:12px}
.ob-one h1{font:600 clamp(32px,3.4vw,48px)/1.08 var(--display);letter-spacing:-.02em}
.ob-one .blurb{font-size:18px;line-height:1.55;max-width:34em}
.ob-one h2{font:600 18px/1.3 var(--body);margin-top:14px}
.ob-cast{list-style:none;padding:0;margin:0;display:flex;flex-wrap:wrap;gap:10px}
.ob-cast a{display:flex;align-items:center;gap:10px;min-height:52px;padding:5px 16px 5px 5px;border:1px solid var(--line);border-radius:var(--r-pill);background:var(--surface);color:var(--ink);text-decoration:none;font-weight:600;line-height:1.15}
.ob-cast img{width:42px;height:42px;border-radius:50%;object-fit:cover;background:var(--sunk)}
.ob-cast small{display:block;font-weight:400;color:var(--muted);font-size:13px;max-width:18em}
.ob-more{margin-top:48px}
.ob-row-head{display:flex;align-items:baseline;justify-content:space-between;gap:16px;margin-bottom:16px}
.ob-row-head h2{font:600 24px/1.2 var(--display)}
.ob-row-head a{color:var(--accent);font-weight:600;white-space:nowrap}
.ob-grid.ob-row{grid-template-columns:repeat(4,minmax(0,1fr))}

@media (max-width:820px){
  .ob-one{grid-template-columns:1fr;gap:20px}
  .ob-one .cv{max-width:340px;width:100%;margin:0 auto}
  .ob-grid.ob-row{grid-template-columns:repeat(2,minmax(0,1fr))}
}

/* Phone: the words above, the picture's right half (where the characters are) below them;
   two covers a row. */
@media (max-width:640px){
  .ob{padding:12px 16px 56px}
  .ob-hero{height:auto;display:flex;flex-direction:column;background:var(--surface);border:1px solid var(--line)}
  .ob-hero .art{position:static;order:2;height:auto;aspect-ratio:3/2;object-position:80% center}
  .ob-hero .say{max-width:none;height:auto;padding:22px 20px 18px;color:var(--ink)}
  .ob-hero h1{font-size:32px}
  .ob-hero p{font-size:16px}
  .ob-grid{grid-template-columns:1fr 1fr;gap:22px 14px}
  .ob-book h3{font-size:15px}
  .ob-one .cv{max-width:230px}
  .ob-one .about{padding-top:0;gap:12px}
  .ob-row-head h2{font-size:20px}
}
