/* The sample GM book viewer (book.js). Colours come from the page's own --ink, --muted, --line, --link and --paper. */
.book-view { max-width:1400px; margin:0 auto 40px; padding:0 16px; }
.book-stage { overflow-x:auto; overflow-y:hidden; padding-bottom:6px; overscroll-behavior-x:contain; }
.book-row { display:flex; align-items:flex-start; gap:6px; width:max-content; margin:0 auto; }
.book-row a { display:block; flex:none; }
.book-row img { display:block; background:#fff; border:1px solid var(--line); box-shadow:0 1px 6px #0002; }
.book-blank { flex:none; }
.book-cap { text-align:center; color:var(--muted); font-size:15px; min-height:1.55em; margin:8px 0 0; }
.book-nav { display:flex; justify-content:center; align-items:center; gap:14px; margin:6px 0 14px; position:relative; }
.book-nav button { width:44px; height:44px; padding:0; font:inherit; font-size:24px; line-height:1;
                   color:var(--ink); background:transparent; border:1px solid var(--line); border-radius:50%; cursor:pointer; }
.book-nav button:hover:not(:disabled) { border-color:var(--link); color:var(--link); }
.book-nav button:disabled { opacity:.3; cursor:default; }
.book-count { min-width:11em; text-align:center; color:var(--muted); }

/* full screen: a small square of corners, set off to the right of the page arrows */
.book-nav .book-full { position:absolute; right:0; top:50%; transform:translateY(-50%);
                       width:36px; height:36px; border-radius:6px; display:grid; place-items:center; }
.book-full svg { width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; }
.book-full .out { display:none; }
.book-full.on .in { display:none; }
.book-full.on .out { display:inline; }
.book-nav .book-full[hidden] { display:none; }
@media (max-width:800px) { .book-nav .book-full { display:none; } }

.book-view:fullscreen { max-width:none; margin:0; padding:16px 24px; background:var(--paper);
                        display:flex; flex-direction:column; justify-content:center; overflow:hidden; }
.book-view:fullscreen .book-stage { flex:none; }
.book-view:fullscreen .book-foot { display:none; }

.book-foot { text-align:center; }
.book-foot .note { color:var(--muted); font-size:15px; margin:10px 0 0; }
.book-download { display:inline-block; padding:10px 18px; border:1px solid var(--link); border-radius:4px;
                 color:var(--link); text-decoration:none; }
.book-download:hover { background:var(--link); color:var(--paper); }
.book-close { margin-left:10px; padding:10px 18px; font:inherit; color:var(--ink); background:transparent;
              border:1px solid var(--line); border-radius:4px; cursor:pointer; }
.book-close:hover { border-color:var(--link); color:var(--link); }

/* the closed book on the home page */
.book-card { display:block; margin:0 auto 40px; padding:0; background:none; border:0; color:var(--link);
             font:inherit; cursor:pointer; text-align:center; }
.book-card img { display:block; height:260px; width:auto; margin:0 auto 10px; background:#fff;
                 border:1px solid var(--line); box-shadow:2px 3px 10px #0003; transition:transform .15s; }
.book-card:hover img { transform:translateY(-3px); }
.book-card:hover span { text-decoration:underline; }
.book-card[hidden], .book-view[hidden] { display:none; }
