/* comic-stats.css (2026-10-16): the heart + views on the scroll reader (comic-stats.js). The player's rail, values copied
   from style.css .rail: a cream heart with the ink line and drop, red once liked, the count under it. Bottom right of the
   page column on a phone (over the art, under the object scrim); on a desk, where the 9:16 column leaves black either
   side, just right of the column. Loaded after comic-scroll.css. */
.cs-rail {
  position: fixed; z-index: 30;
  right: max(6px, env(safe-area-inset-right, 0px), calc((100vw - var(--cs-page-w, 100vw)) / 2 + 6px));
  bottom: calc(max(10px, env(safe-area-inset-bottom, 0px)) + 10px);
  display: grid; justify-items: center; gap: 4px;
}
.cs-rail[hidden] { display: none; }
.cs-rail-btn, .cs-rail-stat {
  display: grid; justify-items: center; gap: 3px; min-width: 56px; padding: 6px 4px;
  font: inherit; color: var(--cream); background: none; border: 0; border-radius: 0;
  -webkit-tap-highlight-color: transparent;
}
.cs-rail-btn { cursor: pointer; }
.cs-rail svg {
  width: 34px; height: 34px; fill: var(--cream); stroke: var(--ink); stroke-width: 1.5; stroke-linejoin: round;
  filter: drop-shadow(2px 2px 0 var(--ink)); transition: fill 160ms var(--ease-out), transform 160ms var(--ease-out);
}
.cs-rail-stat svg { width: 28px; height: 28px; }
.cs-rail-n {
  font-family: var(--body); font-weight: 800; font-size: 0.8125rem; line-height: 1; letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums; color: var(--cream);
  text-shadow: 1px 1px 0 var(--ink), -1px -1px 0 var(--ink), 1px -1px 0 var(--ink), -1px 1px 0 var(--ink);   /* reads on the white paper too */
}
.cs-like[aria-pressed="true"] svg { fill: var(--red); }
.cs-like:active svg { transform: scale(0.9); }
.cs-like:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }
@media (hover: hover) {
  .cs-like:hover svg { fill: var(--yellow); }
  .cs-like[aria-pressed="true"]:hover svg { fill: var(--red); }
}
@media (prefers-reduced-motion: no-preference) {
  .cs-rail { animation: fade 400ms var(--ease-out) backwards; }
  .cs-like.pop svg { animation: pop 420ms var(--ease-out); }
}
/* a desk: beside the column, at the foot, a size up */
@media (min-width: 700px) and (min-aspect-ratio: 1 / 1) {
  .cs-rail { right: auto; left: calc(50% + var(--cs-page-w, 0px) / 2 + 14px); bottom: 28px; gap: 10px; }
  .cs-rail svg { width: 40px; height: 40px; }
  .cs-rail-stat svg { width: 32px; height: 32px; }
  .cs-rail-n { font-size: 1rem; }
}
