/* Scoped styles preserve the cookbook's existing controls and layout. */
button.knife-back-to-top {
  position: fixed;
  z-index: 20;
  right: calc(20px + env(safe-area-inset-right, 0px));
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  display: grid;
  place-items: center;
  width: 72px;
  height: 108px;
  min-width: 48px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.knife-back-to-top[hidden] { display: none !important; }
.knife-back-to-top img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(1px 3px 3px rgb(30 22 15 / 30%));
  transition: transform 180ms ease;
}
button.knife-back-to-top:focus-visible {
  outline: 3px solid var(--olive, #566045);
  outline-offset: 4px;
}
@media (hover: hover) and (pointer: fine) {
  .knife-back-to-top:hover img { transform: translateY(-5px); }
}
@media (max-width: 600px), (max-height: 500px) {
  button.knife-back-to-top {
    width: 48px;
    height: 72px;
    right: calc(12px + env(safe-area-inset-right, 0px));
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  }
}
@media (prefers-reduced-motion: reduce) {
  .knife-back-to-top img { transition: none; }
  .knife-back-to-top:hover img { transform: none; }
}
@media print {
  button.knife-back-to-top { display: none !important; }
}
