.book-analytics-banner {
  position: fixed;
  z-index: 1000;
  inset: auto 1rem 1rem;
  max-width: 760px;
  margin: auto;
  padding: 1rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  color: #173a2c;
  background: #fffdf7;
  border: 1px solid #c9d9cd;
  border-radius: 16px;
  box-shadow: 0 12px 40px #173a2c2b;
  font: 16px/1.45 system-ui, sans-serif;
}

.book-analytics-banner p { margin: .3rem 0 0; }
.book-analytics-banner a { color: #146349; }
.book-analytics-actions { display: flex; gap: .6rem; flex: none; }
.book-analytics-actions button,
[data-book-analytics-settings] {
  cursor: pointer;
  font: inherit;
}
.book-analytics-actions button {
  padding: .6rem .85rem;
  border: 1px solid #1a664d;
  border-radius: 999px;
  color: #174a37;
  background: transparent;
}
.book-analytics-actions button[data-choice="granted"] { color: white; background: #146349; }
.book-analytics-actions button:focus-visible,
[data-book-analytics-settings]:focus-visible { outline: 3px solid #d2913b; outline-offset: 3px; }
[data-book-analytics-settings] { border: 0; padding: 0; color: inherit; background: none; text-decoration: underline; }

@media (max-width: 680px) {
  .book-analytics-banner { flex-direction: column; align-items: stretch; gap: .8rem; }
  .book-analytics-actions { justify-content: flex-end; flex-wrap: wrap; }
}
