.age-badge {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 24;
  color: #fff;
  pointer-events: none;
}

.age-badge-label {
  display: grid;
  place-content: center;
  gap: 3px;
  width: 52px;
  height: 52px;
  border: 1px solid #ffffffc2;
  border-radius: 50%;
  background: #0b0b0b;
  text-align: center;
}

.age-badge-label b {
  font-size: 14px;
  line-height: 1;
}

.age-badge-label small {
  font-size: 8px;
  line-height: 1;
  letter-spacing: .12em;
}

.age-badge-close {
  position: absolute;
  top: -12px;
  right: -8px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  pointer-events: auto;
}

.age-badge-close span {
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border: 1px solid #ffffff80;
  border-radius: 50%;
  background: #0b0b0b;
  color: #fff;
  font-size: 12px;
  line-height: 1;
}

.age-badge-close:hover span,
.age-badge-close:focus-visible span {
  border-color: #fff;
}

body[data-view="reader"] .age-badge,
.book-action-bar-visible .age-badge {
  display: none;
}

@media (max-width: 650px) {
  .age-badge {
    right: max(12px, env(safe-area-inset-right));
    bottom: max(12px, env(safe-area-inset-bottom));
  }

  .age-badge-label {
    width: 46px;
    height: 46px;
  }
}
