/* Eli's Comics -- comic-book styling for Dog Man fans */

:root {
  --ink: #101014;
  --paper: #fffdf5;
  --yellow: #ffd93d;
  --red: #ff4b3e;
  --blue: #2f6df6;
  --green: #35c449;
  --halftone: rgba(0, 0, 0, 0.08);
  --shadow: 6px 6px 0 var(--ink);
  --border: 4px solid var(--ink);
  --pink: #e84a8a;
  --teal: #1f9e8f;
  /* per-author accent tokens -- shared by the homepage links and /books tiles
     so the hover color is identical on both routes */
  --author-eli: var(--blue);
  --author-stella: var(--pink);
  --stella-tint: #fff0f6;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Comic Neue", "Comic Sans MS", cursive;
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--ink);
  background-color: var(--paper);
  background-image: radial-gradient(var(--halftone) 2px, transparent 2px);
  background-size: 22px 22px;
}

h1, h2, h3, .btn, .badge, .brand-name, .tile-title, .page-title {
  font-family: "Bangers", "Comic Neue", cursive;
  letter-spacing: 0.04em;
}

a { color: var(--blue); }

img { max-width: 100%; }

/* ---------- header / nav ---------- */

.site-header {
  background: var(--ink);
  border-bottom: var(--border);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0.6rem 1.2rem;
}

.brand { display: flex; align-items: center; gap: 0.6rem; }
.brand img { height: 56px; }
.brand-name { font-size: 1.9rem; color: #fff; text-decoration: none; }

.site-nav { display: flex; align-items: center; gap: 1.1rem; margin-left: auto; flex-wrap: wrap; }
.site-nav a {
  font-family: "Bangers", cursive;
  font-size: 1.2rem;
  color: #fff;
  text-decoration: none;
  padding: 0.25rem 0.4rem;
}
.site-nav a:hover { text-decoration: underline wavy var(--red) 2px; }
.nav-cta { background: var(--red); color: #fff !important; border: 3px solid var(--ink); }

.nav-toggle { display: none; }

/* ---------- layout ---------- */

main { max-width: 1100px; margin: 1.5rem auto; padding: 0 1rem; }

.home-layout { display: grid; grid-template-columns: 250px 1fr; gap: 1.5rem; }
.home-sidebar .panel { margin-bottom: 1.5rem; }

.panel {
  background: #fff;
  border: var(--border);
  box-shadow: var(--shadow);
  border-radius: 10px;
  padding: 1.2rem;
  margin-bottom: 1.5rem;
}

.page-title { font-size: 2.6rem; margin: 0.5rem 0 1rem; color: var(--red); text-shadow: 3px 3px 0 var(--yellow); }
.section-title { font-size: 1.7rem; color: var(--blue); margin-top: 1.4rem; }
.sidebar-list { list-style: none; padding: 0; margin: 0; }
.sidebar-list li { padding: 0.15rem 0; }
.sidebar-list a { text-decoration: none; color: var(--ink); }
.sidebar-list a:hover { text-decoration: underline wavy var(--green) 2px; }
/* per-author hover color -- same tokens reused by the /books tiles */
.sidebar-list a.author-eli:hover { color: var(--author-eli); text-decoration-color: var(--author-eli); }
.sidebar-list a.author-stella:hover { color: var(--author-stella); text-decoration-color: var(--author-stella); }

/* ---------- buttons, badges, flashes ---------- */

.btn {
  display: inline-block;
  background: var(--yellow);
  color: var(--ink);
  border: 3px solid var(--ink);
  border-radius: 8px;
  box-shadow: 4px 4px 0 var(--ink);
  padding: 0.45rem 1rem;
  font-size: 1.15rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.05s;
}
.btn:hover { transform: translate(-1px, -1px); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.btn-small { font-size: 0.95rem; padding: 0.25rem 0.7rem; }
.btn-secondary { background: #ddd; }

.badge {
  display: inline-block;
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 0.05rem 0.6rem;
  font-size: 0.85rem;
  background: var(--blue);
  color: #fff;
  text-decoration: none;
}
.badge-event { background: var(--red); }
.badge-release { background: var(--green); }
.badge-private { background: var(--ink); }
.badge-tag { background: var(--yellow); color: var(--ink); margin: 0.15rem; }

.flashes { max-width: 1100px; margin: 0.8rem auto; padding: 0 1rem; }
.flash { border: 3px solid var(--ink); border-radius: 8px; padding: 0.5rem 1rem; margin-bottom: 0.5rem; background: #fff; box-shadow: 3px 3px 0 var(--ink); }
.flash-success { background: var(--green); color: #fff; }
.flash-error { background: var(--red); color: #fff; }
.flash-info { background: var(--yellow); }

/* ---------- homepage post ---------- */

.post-title-big { font-size: 2.3rem; margin: 0.2rem 0; }
.post-title-big a { color: var(--ink); text-decoration: none; }
.post-banner { width: 100%; border: 3px solid var(--ink); border-radius: 8px; }
.teaser { font-size: 1.15rem; }
.post-meta { color: #555; font-size: 0.95rem; }
.home-post-privacy { margin: 0.5rem 0; }

/* ---------- books grid ---------- */

.controls { display: flex; flex-wrap: wrap; gap: 1rem; align-items: end; }
.controls label { display: flex; flex-direction: column; font-weight: 700; font-size: 0.9rem; gap: 0.25rem; }

.book-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 1.4rem; }

.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 0.6rem;
  text-decoration: none;
  color: var(--ink);
}
.tile-cover { width: 100%; border: 3px solid var(--ink); border-radius: 6px; aspect-ratio: 3 / 4; object-fit: cover; }
.tile-title { font-size: 1.2rem; text-align: center; margin-top: 0.4rem; }
.tile:hover, .tile:focus { outline: 3px dashed var(--red); outline-offset: 3px; }

/* per-author styling: Stella's tiles get a light pink resting tint, Eli's stay
   white; hover accents match the homepage sidebar links exactly */
.tile.author-stella { background: var(--stella-tint); }
.tile.author-eli:hover, .tile.author-eli:focus { outline-color: var(--author-eli); }
.tile.author-stella:hover, .tile.author-stella:focus { outline-color: var(--author-stella); }
.tile.author-eli:hover .tile-title, .tile.author-eli:focus .tile-title { color: var(--author-eli); }
.tile.author-stella:hover .tile-title, .tile.author-stella:focus .tile-title { color: var(--author-stella); }

/* hover tooltip with a bigger cover + metadata.
   Default is to the right; js/tile-tooltip.js switches to fixed positioning and
   picks the wider side so the card never runs off screen. */
.tile-info {
  display: none;
  position: absolute;
  top: -10px;
  left: 105%;
  z-index: 20;
  width: 330px;
  background: #fff;
  border: 4px solid var(--ink);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 0.8rem;
}
.tile:hover .tile-info, .tile:focus-within .tile-info { display: block; }
.tile-info.positioned {
  position: fixed;
  top: 0;
  left: 0;
  max-width: calc(100vw - 24px);
}
.tile-info img { width: 130px; float: left; margin-right: 0.8rem; border: 3px solid var(--ink); border-radius: 6px; }
.tile-info dt { font-family: "Bangers", cursive; font-size: 1.2rem; }
.tile-info dd { margin: 0.1rem 0; font-size: 0.92rem; }
.tile-preview { font-style: italic; color: #444; }

/* ---------- book detail ---------- */

.book-detail-grid { display: grid; grid-template-columns: 320px 1fr; gap: 1.8rem; }
.book-cover-large { width: 100%; border: 4px solid var(--ink); border-radius: 8px; box-shadow: var(--shadow); }
.author-logo { margin-top: 1rem; height: 110px; }
.book-meta { display: flex; flex-wrap: wrap; gap: 1.2rem; padding: 0; }
.book-meta dt { font-family: "Bangers", cursive; font-size: 1.05rem; }
.book-meta dd { margin: 0; }
.series-box { background: var(--yellow); border: 3px solid var(--ink); border-radius: 8px; padding: 0.6rem 1rem; margin: 1rem 0; }
.enticing { background: var(--paper); border-left: 6px solid var(--green); padding: 0.6rem 1rem; font-style: italic; }

.advisories { display: grid; gap: 1rem; grid-template-columns: 1fr 1fr; margin: 1rem 0; }
.advisory { border: 3px solid var(--ink); border-radius: 8px; padding: 0.6rem 1rem; background: #fff; }
.advisory h4 { margin: 0 0 0.3rem; font-family: "Bangers", cursive; letter-spacing: 0.05em; }
.advisory-funny { background: var(--yellow); }

.buy-buttons { display: flex; flex-wrap: wrap; gap: 0.8rem; }
.fine-print { font-size: 0.85rem; color: #666; }
.center { text-align: center; }

/* ---------- authors ---------- */

.author-cards { display: flex; flex-wrap: wrap; gap: 1.2rem; margin-bottom: 1.5rem; }
.author-card { display: flex; align-items: center; gap: 0.8rem; text-decoration: none; color: var(--ink); margin: 0; flex: 1 1 200px; }
.author-card img { height: 70px; width: 70px; border-radius: 50%; border: 3px solid var(--ink); background: var(--blue); }
.author-card.selected { outline: 4px dashed var(--red); }
.author-name { font-family: "Bangers", cursive; font-size: 1.3rem; }
.author-detail-head { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; }
.author-logo-large { height: 140px; }
/* ---------- carousels ---------- */

.author-carousel {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas: "prev stage next" "dots dots dots";
  align-items: center;
  gap: 0.6rem 1rem;
  margin: 1.25rem 0;
}
.author-carousel-stage { grid-area: stage; margin: 0; text-align: center; }
.author-carousel-stage img {
  max-width: 100%;
  max-height: 340px;
  border: 3px solid var(--ink);
  border-radius: 10px;
  background: #fff;
  box-shadow: 5px 5px 0 var(--ink);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.author-carousel-stage img:hover { transform: scale(1.02); }
.author-carousel-stage figcaption { margin-top: 0.5rem; font-size: 0.9rem; color: #555; }
.carousel-arrow {
  font-family: "Bangers", cursive;
  font-size: 2rem;
  line-height: 1;
  padding: 0.2rem 0.7rem;
  cursor: pointer;
  color: var(--ink);
  background: var(--yellow);
  border: 3px solid var(--ink);
  border-radius: 8px;
}
.carousel-arrow:hover { background: var(--red); color: #fff; }
.author-carousel [data-carousel-prev] { grid-area: prev; }
.author-carousel [data-carousel-next] { grid-area: next; }
.author-carousel-dots { grid-area: dots; display: flex; gap: 0.5rem; justify-content: center; }
.author-carousel-dots button {
  width: 14px;
  height: 14px;
  padding: 0;
  cursor: pointer;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: #fff;
}
.author-carousel-dots button.active { background: var(--red); }

/* Small vertical-thumbnail gallery on the book detail page. */
.thumb-carousel {
  display: flex;
  gap: 0.6rem;
  margin-top: 1.25rem;
  justify-content: center;
  align-items: flex-start;
}
.thumb-carousel-rail {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 320px;
  overflow-y: auto;
  padding-right: 2px;
}
.thumb-carousel-thumb {
  padding: 0;
  cursor: pointer;
  background: #fff;
  border: 3px solid var(--ink);
  border-radius: 6px;
  line-height: 0;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.thumb-carousel-thumb img { width: 58px; height: 58px; object-fit: cover; display: block; }
.thumb-carousel-thumb:hover { transform: scale(1.12); }
.thumb-carousel-thumb.active { border-color: var(--red); transform: scale(1.08); }
.thumb-carousel-stage {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  text-align: center;
}
.thumb-carousel-image {
  max-width: 100%;
  max-height: 320px;
  border: 3px solid var(--ink);
  border-radius: 8px;
  background: #fff;
  box-shadow: 4px 4px 0 var(--ink);
}
@media (max-width: 760px) {
  .thumb-carousel { gap: 0.45rem; }
}

/* Optional author/editor notes under the synopsis. */
.book-note {
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  border: 3px dashed var(--ink);
  background: var(--paper);
}
.book-note h4 { margin: 0 0 0.35rem; font-family: "Bangers", cursive; font-size: 1.15rem; }
.book-note p { margin: 0; }
.book-note-author { border-left: 8px solid var(--blue); }
.book-note-editor { border-left: 8px solid var(--red); }
.author-books { max-height: 420px; overflow-y: auto; border: 3px solid var(--ink); border-radius: 8px; }
.author-book-row { display: flex; align-items: center; gap: 0.9rem; padding: 0.5rem 0.8rem; border-bottom: 2px dashed #bbb; text-decoration: none; color: var(--ink); }
.author-book-row img { height: 75px; border: 2px solid var(--ink); }
.author-book-row:hover { background: var(--yellow); }

/* ---------- news ---------- */

.news-list { display: grid; gap: 1.4rem; }
.news-card { display: grid; grid-template-columns: 300px 1fr; gap: 1.2rem; text-decoration: none; color: var(--ink); margin: 0; }
.news-banner { width: 100%; height: 100%; object-fit: cover; border: 3px solid var(--ink); border-radius: 6px; }
.news-card h2 { margin: 0 0 0.3rem; font-size: 1.6rem; }
.post-content p { margin: 0.8rem 0; }
.post-inline-img { display: block; margin: 1rem auto; max-width: 480px; border: 3px solid var(--ink); border-radius: 8px; }
.post-inline-figure { margin: 1.25rem auto; text-align: center; }
.post-inline-figure .post-inline-img { margin: 0 auto 0.5rem; }
.post-inline-figure figcaption { max-width: 480px; margin: 0 auto; font-size: 0.9rem; font-style: italic; opacity: 0.85; }
.post-inline-img-link { display: inline-block; }
.post-body blockquote, .post-content blockquote {
	margin: 1.25rem 0;
	padding: 0.75rem 1rem;
	border-left: 4px solid var(--ink);
	background: rgba(0, 0, 0, 0.04);
	font-style: italic;
}
.post-body blockquote p, .post-content blockquote p { margin: 0; }
.post-tags { margin-top: 1.5rem; }

/* ---------- forms ---------- */

.form-panel { max-width: 640px; margin: 0 auto 2rem; }
form label { display: block; font-weight: 700; margin-bottom: 0.9rem; }
input[type="text"], input[type="email"], input[type="password"], textarea, select {
  width: 100%;
  font-family: inherit;
  font-size: 1rem;
  padding: 0.5rem;
  border: 3px solid var(--ink);
  border-radius: 6px;
  background: #fff;
  margin-top: 0.25rem;
}
.form-help { margin: -0.25rem 0 1rem; font-size: 0.85rem; line-height: 1.5; color: #555; }
.form-help code { background: #f2f2f2; padding: 0.05rem 0.25rem; border-radius: 4px; }
.checkbox-label { display: flex; align-items: center; gap: 0.5rem; }
.checkbox-label input { width: auto; }
.hp-field { position: absolute; left: -9999px; top: -9999px; }

/* ---------- admin ---------- */

.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td { border-bottom: 2px solid #ccc; padding: 0.5rem 0.6rem; text-align: left; vertical-align: top; }
.admin-actions { display: flex; gap: 0.5rem; }
.admin-actions form { margin: 0; }

/* ---------- footer ---------- */

.site-footer { text-align: center; padding: 1.5rem; font-size: 0.9rem; color: #666; }
.footer-newsletter {
  max-width: 640px;
  margin: 0 auto 1.5rem;
  padding: 1.25rem 1.5rem;
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 10px;
  box-shadow: 4px 4px 0 var(--ink);
  color: var(--ink);
}
.footer-newsletter-title { margin: 0 0 0.4rem; font-size: 1.35rem; }
.footer-newsletter-copy { margin: 0 0 1rem; }
.newsletter-form { display: flex; flex-wrap: wrap; gap: 0.6rem; justify-content: center; }
.newsletter-form input[type="email"] { flex: 1 1 240px; width: auto; margin-top: 0; }
.footer-fineprint { margin: 0.75rem 0 0; font-size: 0.8rem; color: #777; }

/* ---------- contact page ---------- */

.contact-book-note { max-width: 640px; margin: 0 auto 1.5rem; border-left: 8px solid var(--red); }
.contact-book-note p { margin: 0; }
.req { color: var(--red); }

/* ---------- buy direct from the author ---------- */

.btn-direct {
  display: inline-block;
  background: var(--yellow);
  color: var(--ink) !important;
  text-align: center;
  line-height: 1.3;
  white-space: normal;
}

/* ---------- responsive ---------- */

@media (max-width: 800px) {
  .home-layout { grid-template-columns: 1fr; }
  .book-detail-grid { grid-template-columns: 1fr; }
  .book-cover-col { text-align: center; }
  .news-card { grid-template-columns: 1fr; }
  .advisories { grid-template-columns: 1fr; }
  .tile-info { display: none !important; } /* hover tooltips don't work on touch; tap opens the book page */
  .site-header .brand { margin-right: auto; }
  .nav-toggle {
    display: block; order: 2; margin-left: auto; width: 36px; height: 36px;
    appearance: none; -webkit-appearance: none; background: transparent; border: 0; border-radius: 0;
    box-shadow: none; cursor: pointer; position: relative; margin: 0 0 0 auto; padding: 0;
  }
  .nav-toggle::before {
    content: ""; position: absolute; left: 7px; right: 7px; top: 9px; height: 3px;
    background: #fff; border-radius: 2px;
    box-shadow: 0 7px 0 #fff, 0 14px 0 #fff;
  }
  .nav-toggle:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
  .site-nav { display: none; width: 100%; flex-direction: column; align-items: flex-start; }
  .nav-toggle:checked ~ .site-nav { display: flex; }
  .brand-name { font-size: 1.5rem; }
  .author-books { max-height: none; }
}

/* ---------- buy sections on a book page ---------- */

.buy-section { margin-top: 1.4rem; }
.buy-section:first-of-type { margin-top: 0.6rem; }
.buy-section-title {
  margin: 0 0 0.7rem;
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-bottom: 2px solid rgba(0, 0, 0, 0.15);
  padding-bottom: 0.35rem;
}
.direct-author-copy { margin: 0; }
.direct-author-copy a { font-weight: 700; }

/* ---------- PDF editions (bought on this site, not a third party) ---------- */

.pdf-offer {
  padding: 1rem 1.1rem;
  border: 3px dashed var(--teal, #1f9e8f);
  border-radius: 10px;
  background: #f2fbf9;
}
.pdf-offer-copy { margin: 0 0 0.8rem; }
.pdf-offer-fineprint { margin: 0.55rem 0 0; font-size: 0.85rem; opacity: 0.85; }
.pdf-flag {
  display: inline-block;
  background: var(--teal, #1f9e8f);
  color: #fff;
  border-radius: 999px;
  padding: 0.1rem 0.6rem;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* On-site purchase: solid teal + download arrow, so it reads differently
   from the yellow third-party "Buy ..." buttons above it. */
.btn-pdf {
  background: var(--teal, #1f9e8f);
  color: #fff;
  border-color: var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
}
.btn-pdf:hover { background: #178578; }
.btn-pdf-icon { font-weight: 700; }

.cart-panel, .receipt-panel { max-width: 760px; }
.cart-list { list-style: none; margin: 1rem 0; padding: 0; }
.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.8rem 0;
  border-bottom: 2px dashed rgba(0, 0, 0, 0.18);
}
.cart-item-main { min-width: 0; }
.cart-item-title { margin: 0 0 0.15rem; font-size: 1.15rem; }
.cart-item-meta { margin: 0; font-size: 0.88rem; opacity: 0.85; }
.cart-item-side { display: flex; align-items: center; gap: 0.8rem; flex-shrink: 0; }
.cart-item-price { font-weight: 700; }
.cart-total-row {
  display: flex;
  justify-content: space-between;
  font-size: 1.2rem;
  padding: 0.5rem 0 1rem;
}
.cart-notice {
  margin: 0.5rem 0 1rem;
  padding: 0.7rem 0.9rem;
  border-left: 4px solid #b36b00;
  background: #fff6e5;
}
.promo-box {
  margin: 1rem 0 0.5rem;
  padding: 0.8rem 0.9rem;
  border: 2px dashed rgba(0, 0, 0, 0.22);
}
.promo-toggle summary.promo-summary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  list-style: none;
  font-size: 0.85rem;
  color: #6f6f6f;
}
.promo-toggle summary.promo-summary::-webkit-details-marker { display: none; }
.promo-toggle summary.promo-summary::after {
  content: "";
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid currentColor;
  transition: transform 0.15s ease;
}
.promo-toggle[open] summary.promo-summary::after { transform: rotate(180deg); }
.promo-toggle summary.promo-summary:hover { color: #3d3d3d; }
.promo-toggle summary.promo-summary:focus-visible {
  outline: 2px solid #1f7a4d;
  outline-offset: 2px;
}
.promo-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.7rem;
  max-width: 300px;
}
.promo-form label { margin: 0; font-weight: 700; }
.promo-form input[type="text"] {
  flex: 1 1 10rem;
  min-width: 0;
  text-transform: uppercase;
}
.promo-applied { margin: 0 0 0.6rem; }
@media (max-width: 600px) {
  .promo-form { max-width: none; width: 100%; }
  .promo-form input[type="text"] { flex: 1 1 100%; }
}
.cart-total-discount { color: #1f7a4d; }
.cart-total-discount + .cart-total-row { padding-top: 0; }
.download-list { list-style: none; margin: 1rem 0; padding: 0; }
.download-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.8rem 0;
  border-bottom: 2px dashed rgba(0, 0, 0, 0.18);
}
.download-title { margin: 0 0 0.15rem; font-size: 1.15rem; }
.download-meta { margin: 0; font-size: 0.85rem; opacity: 0.8; }
.nav-cart-count {
  display: inline-block;
  min-width: 1.2rem;
  padding: 0 0.3rem;
  border-radius: 999px;
  background: var(--teal, #1f9e8f);
  color: #fff;
  font-size: 0.75rem;
  text-align: center;
}

@media (max-width: 480px) {
  .cart-item, .download-item { flex-direction: column; align-items: flex-start; }
  .cart-item-side { width: 100%; justify-content: space-between; }
  .btn-pdf { width: 100%; text-align: center; }
}

/* Scrolling banner on individual book pages (/books/<slug>). The block sits
   directly under <header> outside <main>, so it is 100% of the window width,
   flush with the header (no margin/padding above it). position:sticky + top:0
   makes it latch to the top of the window while scrolling down and unlatch
   back under the header when the user scrolls up to it. The message is rendered
   twice, each copy ending in one space, so the -50% loop point repeats the text
   with no gap. */
.book-banner {
  position: sticky;
  top: 0;
  z-index: 60;
  width: 100%;
  margin: 0;
  padding: 0.4rem 0;
  overflow: hidden;
  white-space: nowrap;
  background: var(--yellow);
  color: #b3401a;
  border-bottom: 1px solid #000;
  /* Hidden until book-banner.js confirms the stylesheet is live. The inline
     style on the element carries the same rule; this keeps the element
     invisible even if the inline attribute is dropped. */
  visibility: hidden;
  opacity: 0;
}
/* Added by book-banner.js only after it has verified the animation and the
   background are actually applied. */
.book-banner.is-ready {
  visibility: visible;
  opacity: 1;
}
.book-banner-track {
  display: inline-block;
  margin: 0;
  font-weight: 700;
  animation: book-banner-scroll 60s linear infinite;
  will-change: transform;
}
@keyframes book-banner-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .book-banner { display: none; }
}
