button[data-portfolio-top] {
  position: fixed;
  right: 1.2rem;
  bottom: 1.2rem;
  right: max(1.2rem, env(safe-area-inset-right));
  bottom: max(1.2rem, env(safe-area-inset-bottom));
  z-index: 999;
  display: grid;
  place-items: center;
  box-sizing: border-box;
  width: 52px;
  height: 52px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #4f696f;
  color: #f7f3ee;
  box-shadow: 0 10px 25px rgb(0 0 0 / .18);
  font: 700 1.05rem/1 system-ui, sans-serif;
  cursor: pointer;
}

button[data-portfolio-top][hidden] {
  display: none !important;
}

button[data-portfolio-top]:hover {
  background: #3f575d;
}

button[data-portfolio-top]:focus-visible {
  outline: 3px solid #f7f3ee;
  outline-offset: 2px;
  box-shadow: 0 0 0 7px #273136;
}

button[data-portfolio-top].portfolio-top--lesson {
  bottom: calc(var(--dockH, 3.7rem) + 1.2rem);
  bottom: calc(var(--dockH, 3.7rem) + max(1.2rem, env(safe-area-inset-bottom)));
  z-index: 9;
}

@media (prefers-reduced-motion: reduce) {
  html, body {
    scroll-behavior: auto !important;
  }
}

@media print {
  button[data-portfolio-top] {
    display: none !important;
  }
}
