.book-ad-card {
  margin: 16px 0 20px;
  padding: 16px;
  color: #e8e9ec;
  background: linear-gradient(150deg, #1b1d22, #101114);
  border: 1px solid #3a3428;
  border-radius: 9px;
  font: 14px/1.55 Arial, sans-serif;
  text-align: center;
}
.book-ad-card .book-ad-kicker {
  margin: 0 0 12px;
  color: #d3ad69;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.book-ad-cover {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 12px;
  padding: 0 !important;
  border: 0 !important;
  line-height: 0;
}
.book-ad-cover img {
  display: block;
  width: auto;
  max-width: min(100%, 170px);
  max-height: 225px;
  margin: 0 auto;
  object-fit: contain;
  border: 1px solid #ffffff24;
  border-radius: 4px;
  box-shadow: 0 8px 20px #0008;
}
.book-ad-card h2 {
  margin: 0 0 8px !important;
  font-size: 17px !important;
  line-height: 1.35;
}
.book-ad-card h2 a {
  color: #f0cc8d;
  text-decoration: none;
}
.book-ad-card p:not(.book-ad-kicker) {
  margin: 0 0 12px;
  color: #c7c9ce;
}
.book-ad-card .book-ad-cta {
  display: inline-block;
  padding: 9px 12px;
  color: #17110a;
  background: linear-gradient(180deg, #e2bf7b, #bb8b42);
  border: 0;
  border-radius: 5px;
  font-weight: 700;
  text-decoration: none;
}
.book-ad-card .book-ad-cta:hover {
  color: #090909;
  filter: brightness(1.08);
}
.book-ad-inline {
  margin: 24px 0;
  padding: 12px 15px;
  color: #d7d8dc;
  background: #171614;
  border-left: 3px solid #d3ad69;
  font-size: .94em;
}
.book-ad-inline a {
  color: #f0cc8d;
  font-weight: 700;
}
.book-vertical-ad, .book-mobile-anchor-ad { display: none; }
@media (min-width: 768px) and (hover: hover) and (pointer: fine) {
  .book-vertical-ad {
    position: fixed;
    z-index: 1000;
    top: 50%;
    right: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    box-sizing: border-box;
    width: 160px;
    height: min(600px, calc(100vh - 28px));
    padding: 22px 12px 14px;
    transform: translateY(-50%);
    overflow: auto;
    color: #e8e9ec;
    background: linear-gradient(160deg, #202126, #101114);
    border: 1px solid #705c39;
    border-radius: 8px;
    box-shadow: 0 10px 30px #0009;
    text-align: center;
    font: 13px/1.45 Arial, sans-serif;
    animation: bookVerticalIn .4s ease-out both;
  }
  .book-vertical-ad[hidden] { display: none; }
  .book-vertical-cover { display: block; margin: 0 auto 12px; line-height: 0; }
  .book-vertical-cover img { display: block; width: 130px; max-height: 220px; object-fit: contain; border-radius: 3px; }
  .book-vertical-copy .book-ad-kicker { margin: 0 0 7px; color: #d3ad69; font-size: 9px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
  .book-vertical-copy h2 { margin: 0 0 8px; font-size: 16px; line-height: 1.25; }
  .book-vertical-copy h2 a { color: #f0cc8d; text-decoration: none; }
  .book-vertical-copy p:not(.book-ad-kicker) { margin: 0 0 12px; color: #c7c9ce; font-size: 12px; }
  .book-vertical-cta, .mobile-anchor-cta { display: inline-block; padding: 8px 9px; color: #17110a !important; background: linear-gradient(180deg, #e2bf7b, #bb8b42); border-radius: 5px; font-weight: 700; text-decoration: none; }
  .book-vertical-close { position: absolute; top: 3px; right: 4px; width: 24px; height: 24px; color: #e8e9ec; background: #0007; border: 1px solid #ffffff30; border-radius: 50%; font-size: 18px; line-height: 1; cursor: pointer; }
}
@keyframes bookVerticalIn { from { opacity: 0; transform: translate(18px, -50%); } to { opacity: 1; transform: translate(0, -50%); } }
@media (max-width: 767px), (hover: none) and (pointer: coarse) {
  .book-mobile-anchor-ad {
    position: fixed;
    z-index: 1001;
    right: 0;
    bottom: 0;
    left: 0;
    display: block;
    box-sizing: border-box;
    width: 100%;
    height: calc(100px + env(safe-area-inset-bottom));
    padding: 0 10px env(safe-area-inset-bottom);
    color: #f1f1f2;
    background: #111215;
    border-top: 2px solid #b89556;
    box-shadow: 0 -8px 28px #0009;
    font: 14px/1.4 Arial, sans-serif;
  }
  .book-mobile-anchor-ad[data-state="collapsed"] { height: calc(42px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); }
  .mobile-anchor-controls { display: flex; align-items: center; gap: 8px; height: 32px; color: #d3ad69; font-size: 9px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
  .mobile-anchor-controls > span { flex: 1; }
  .mobile-anchor-toggle, .mobile-anchor-close { display: inline-grid; place-items: center; width: 34px; height: 32px; padding: 0; color: #fff; background: #292a2e; border: 1px solid #ffffff30; border-radius: 5px; font-size: 18px; line-height: 1; cursor: pointer; }
  .mobile-anchor-close { font-size: 21px; }
  .mobile-anchor-content { display: grid; box-sizing: border-box; grid-template-columns: 42px minmax(0, 1fr); align-items: center; gap: 8px; height: calc(100% - 32px); margin: 0 auto; }
  .mobile-anchor-cover { display: block; line-height: 0; }
  .mobile-anchor-cover img { display: block; width: 42px; max-height: 58px; object-fit: contain; border-radius: 3px; }
  .mobile-anchor-copy { min-width: 0; }
  .mobile-anchor-copy h2 { overflow: hidden; margin: 0 0 2px; color: #f0cc8d; font-size: 13px; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
  .mobile-anchor-copy p { overflow: hidden; margin: 0 0 3px; color: #d0d0d2; font-size: 10px; line-height: 1.15; text-overflow: ellipsis; white-space: nowrap; }
  .mobile-anchor-cta { padding: 4px 7px; font-size: 10px; line-height: 1.1; }
  .mobile-anchor-collapsed { display: none; }
  .book-mobile-anchor-ad[data-state="collapsed"] .mobile-anchor-controls { display: none; }
  .book-mobile-anchor-ad[data-state="collapsed"] .mobile-anchor-content { display: none; }
  .book-mobile-anchor-ad[data-state="collapsed"] .mobile-anchor-collapsed { display: flex; align-items: center; justify-content: flex-end; gap: 7px; height: 100%; padding: 0 2px; }
  body.book-mobile-ad-expanded { padding-bottom: calc(110px + env(safe-area-inset-bottom)) !important; }
  body.book-mobile-ad-collapsed { padding-bottom: calc(52px + env(safe-area-inset-bottom)) !important; }
}
@media (max-width: 850px) {
  .book-ad-card {
    text-align: left;
  }
  .book-ad-cover {
    margin-left: 0;
  }
  .book-ad-cover img {
    margin-left: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .book-vertical-ad { animation: none !important; }
}
