.history-pack-back,
.history-story-back {
  position: relative;
  z-index: 9000;
  display: flex;
  width: max-content;
  max-width: calc(100% - 24px);
  min-height: 42px;
  align-items: center;
  justify-content: center;
  margin: 14px auto 18px;
  padding: 10px 16px;
  border: 1px solid rgba(255, 232, 184, .32);
  border-radius: 999px;
  color: #fff4d3;
  background: rgba(8, 12, 18, .88);
  box-shadow: 0 12px 28px rgba(0, 0, 0, .32);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: .8rem;
  font-weight: 850;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}

body > a.history-pack-back[href^="/grammar-story-challenge/"],
body > a.history-story-back[href^="/grammar-story-challenge/"] {
  top: 0 !important;
}

.history-pack-back:hover,
.history-pack-back:focus-visible,
.history-story-back:hover,
.history-story-back:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(255, 240, 189, .7);
  color: #fff;
  background: rgba(53, 35, 17, .94);
  outline: none;
}

@media (max-width: 560px) {
  .history-pack-back,
  .history-story-back {
    min-height: 40px;
    margin-top: 10px;
    padding: 9px 13px;
    font-size: .74rem;
  }
}

@media print {
  .history-pack-back,
  .history-story-back {
    display: none !important;
  }
}
