/* Shared back-to-home control for poem projects */
.poe-back {
  position: fixed;
  top: max(0.75rem, env(safe-area-inset-top, 0px));
  right: max(0.75rem, env(safe-area-inset-right, 0px));
  left: auto;
  z-index: 2147483000;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem 0.55rem 0.75rem;
  min-height: 44px;
  min-width: 44px;
  border-radius: 999px;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: #f4f0eb;
  background: rgba(12, 10, 20, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.poe-back:hover,
.poe-back:focus-visible {
  background: rgba(28, 24, 42, 0.95);
  border-color: rgba(199, 125, 255, 0.45);
  box-shadow: 0 6px 28px rgba(199, 125, 255, 0.2);
  transform: translateY(-1px);
  outline: none;
}

.poe-back:active {
  transform: translateY(0);
}

.poe-back__icon {
  font-size: 1.1rem;
  line-height: 1;
}

@media (max-width: 480px) {
  .poe-back {
    padding: 0.55rem 0.85rem;
    font-size: 0.8125rem;
  }

  .poe-back__text--long {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .poe-back {
    transition: none;
  }
}
