/* LIST.ENERGY v6.5.6 — make contextual Previous page visually primary.
   Stack it above Back to home on the right, with safe-area support.
   Render only when a trustworthy same-site history entry or an applicable
   detail-page directory fallback exists (see inc/home-return.php). */
.le-page-back {
  position: fixed !important;
  z-index: 10001 !important;
  right: max(14px, env(safe-area-inset-right, 0px)) !important;
  bottom: calc(82px + env(safe-area-inset-bottom, 0px)) !important;
  box-sizing: border-box;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: max-content;
  max-width: min(90vw, 260px);
  min-height: 48px;
  margin: 0;
  padding: 7px 15px 7px 8px;
  border: 2px solid #ffc38d;
  border-radius: 999px;
  background: #f6772f;
  color: #1b2420 !important;
  box-shadow: 0 10px 28px rgba(42,29,17,.28), 0 0 0 1px rgba(25,25,22,.10);
  font: 800 13px/1.2 system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
  letter-spacing: .005em;
  text-decoration: none !important;
  white-space: nowrap;
  isolation: isolate;
  -webkit-tap-highlight-color: transparent;
  animation: le-home-return-appear .38s cubic-bezier(.2,.75,.3,1) both;
  transition: background-color .2s ease, border-color .2s ease,
              box-shadow .2s ease, transform .2s ease, opacity .2s ease;
}
.le-page-back[hidden] { display: none !important; }
.le-page-back__icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #24322d;
  color: #fff !important;
}
.le-page-back__icon svg {
  display: block;
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.le-page-back__label {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  max-width: 195px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.le-page-back__short { display: none; }
.le-page-back__long { display: inline; overflow: hidden; text-overflow: ellipsis; }
.le-page-back:hover {
  background: #ff934f;
  border-color: #ffcf9f;
  box-shadow: 0 13px 36px rgba(42,29,17,.31), 0 0 0 3px rgba(246,119,47,.18);
  transform: translateY(-2px);
  color: #15211b !important;
}
.le-page-back:active { transform: translateY(0) scale(.98); }
.le-page-back:focus-visible {
  outline: 3px solid #103a31 !important;
  outline-offset: 3px;
  box-shadow: 0 0 0 6px #fff, 0 10px 28px rgba(42,29,17,.28);
}
body.le-home-return-leaving .le-page-back { opacity: 0; transform: translateY(7px); }
@media (min-width: 760px) {
  .le-page-back {
    right: max(25px, env(safe-area-inset-right, 0px)) !important;
    bottom: calc(94px + env(safe-area-inset-bottom, 0px)) !important;
    min-height: 52px;
    padding: 8px 19px 8px 9px;
    font-size: 14px;
    gap: 11px;
  }
  .le-page-back__icon { width: 34px; height: 34px; flex-basis: 34px; }
}
@media (max-width: 359px) {
  .le-page-back { max-width: calc(100vw - 28px); padding-right: 12px; gap: 7px; font-size: 12px; }
  .le-page-back__icon { width: 30px; height: 30px; flex-basis: 30px; }
}
@media (hover: none) { .le-page-back:hover { transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .le-page-back, .le-page-back * { transition: none !important; animation: none !important; }
}
@media (forced-colors: active) {
  .le-page-back { background: ButtonFace; border: 2px solid ButtonText; color: ButtonText !important; }
  .le-page-back__icon { background: ButtonFace; color: ButtonText !important; border: 1px solid ButtonText; }
}
