.case-reaction {
  position: relative;
  display: grid;
  flex: none;
  justify-items: end;
}

.specular-button.pulse-heart {
  --ph-liked: #ff4d6d;
  --ph-idle: #8b8b93;
  min-height: 0;
  padding: 0;
  touch-action: manipulation;
  user-select: none;
}

.pulse-heart:focus-visible { outline: 2px solid var(--ph-liked); outline-offset: 3px; }

.pulse-heart__pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 7px 10px;
}

.pulse-heart__heart {
  width: 22px;
  height: 22px;
  overflow: visible;
  color: var(--ph-idle);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75px;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: color 160ms ease;
}

.pulse-heart[aria-pressed="true"] .pulse-heart__heart { color: var(--ph-liked); fill: currentColor; }

@media (hover: hover) and (pointer: fine) {
  .pulse-heart[aria-pressed="false"]:not(:disabled):hover .pulse-heart__heart {
    color: color-mix(in srgb, var(--ph-idle) 45%, var(--ph-liked));
  }
}

.pulse-heart__count {
  display: inline-flex;
  align-items: flex-start;
  font-size: .875rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  white-space: pre;
}

.pulse-heart__slot { display: block; height: 1em; overflow: hidden; }
.pulse-heart__roll { display: flex; flex-direction: column; }
.pulse-heart__roll > span { display: block; height: 1em; }

.pulse-heart__sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.pulse-heart__message {
  position: absolute;
  z-index: 1;
  top: calc(100% + 4px);
  right: 0;
  width: max-content;
  max-width: min(235px, 75vw);
  padding: 5px 8px;
  border-radius: 6px;
  background: #232326;
  color: #f5f5f5;
  font-size: .75rem;
}

@media (prefers-contrast: more) {
  .specular-button.pulse-heart { border-color: var(--ph-idle); }
}

@media (prefers-reduced-motion: reduce) {
  .pulse-heart:active:not(:disabled) { transform: none; }
}
