
/* Fixed rails mirror the PokéHit Pokémon catalog's measured side margins. */
body { padding-bottom: calc(116px + env(safe-area-inset-bottom, 0px)); }
body[data-side-layout="rails"] { padding-bottom: 24px; }

.side-navigation { position: fixed; inset: 0; z-index: 31; pointer-events: none; }
.side-action {
  position: fixed;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: min(205px, calc(50vw - 20px));
  height: 42px;
  min-width: 0;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid #ffffff80;
  border-radius: 999px;
  background: linear-gradient(135deg, #204f6c, #0d2b3e);
  box-shadow: 0 5px 14px #0004;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  pointer-events: auto;
  filter: brightness(1);
  transition: filter 180ms ease;
}
.side-action.side-left { left: 12px; }
.side-action.side-right { right: 12px; }
.side-lower {
  bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  translate: 0 0;
  transition: filter 180ms ease, translate 180ms ease;
}
.side-shop { background: linear-gradient(135deg, #d94740, #952227); }
.side-action:hover { filter: brightness(1.12); }
/* Keep the original capsule edge clickable while the surface rises by 1px. */
.side-lower::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  translate: 0 0;
  pointer-events: none;
  transition: translate 180ms ease;
}
.side-lower:hover { translate: 0 -1px; }
.side-lower:hover::after {
  translate: 0 1px;
  pointer-events: auto;
}
.side-action:focus-visible { outline: 3px solid #347fa0; outline-offset: 3px; }

.side-top {
  bottom: calc(60px + env(safe-area-inset-bottom, 0px));
  border-color: #ffffffa6;
  background: linear-gradient(135deg, #285d7a, #0c2b3e);
  box-shadow: 0 6px 18px #0005;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease, visibility 0ms linear 180ms, filter 180ms ease;
}
.side-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
  transition-delay: 0ms;
}

.side-collage { display: none; pointer-events: none; }
body[data-side-layout="rails"] .side-action {
  bottom: auto;
  width: var(--side-width);
  height: 50px;
  font-size: clamp(12px, 1vw, 18px);
}
body[data-side-layout="rails"] .side-action.side-left { left: calc(var(--side-left-center) - var(--side-width) / 2); }
body[data-side-layout="rails"] .side-action.side-right { right: calc(var(--side-right-center) - var(--side-width) / 2); }
body[data-side-layout="rails"] .side-top { top: var(--side-top); }
body[data-side-layout="rails"] .side-lower { top: calc(var(--side-top) + 60px); }
body[data-side-layout="rails"] .side-collage {
  display: block;
  position: fixed;
  top: var(--side-art-top);
  width: 245px;
  height: 390px;
  transform: scale(var(--side-art-scale));
  transform-origin: center top;
}
body[data-side-layout="rails"] .side-collage.side-left { left: calc(var(--side-left-center) - 122.5px); }
body[data-side-layout="rails"] .side-collage.side-right { right: calc(var(--side-right-center) - 122.5px); }
.side-collage img {
  position: absolute;
  display: block;
  height: auto;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 8px 8px #0004);
}
.side-subaru { left: 1px; top: 1px; width: 154px; }
.side-emilia { right: 0; top: 43px; width: 173px; }
.side-puck { left: 24px; top: 245px; width: 71px; }
.side-ram { left: 0; top: 4px; width: 151px; }
.side-rem { right: 0; top: 36px; width: 171px; }
.side-beatrice { left: 31px; top: 181px; width: 126px; }

@media (prefers-reduced-motion: reduce) {
  .side-action, .side-lower::after { transition: none; }
  .side-lower:hover, .side-lower:hover::after { translate: none; }
}

