.reader-score {
  --score-ink: #611b2b;
  --score-accent: #a32945;
  --score-soft: #fff2f5;
  --score-lane: #ebc7d0;
  margin-block: 1.25rem .4rem;
  padding: clamp(.85rem, 3vw, 1.25rem);
  border: 1px solid var(--score-lane);
  border-radius: 14px;
  color: var(--score-ink);
  background: var(--score-soft);
}
.reader-score[aria-label] h2,
.reader-score[aria-label] h3 { margin: 0; font-size: 1.05rem; color: inherit; }
.reader-score-heading { display: flex; gap: .45rem .9rem; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.reader-score-heading p {
  margin: 0; padding: .25rem .65rem;
  border-radius: 999px; background: var(--score-ink); color: #fff;
  font-size: .85rem; font-weight: 700; font-variant-numeric: tabular-nums;
}
.reader-score form { margin-top: .7rem; --score-progress: 0%; }
.reader-score label { display: grid; grid-template-columns: 1fr auto; align-items: center; font-weight: 700; }
.reader-score output { font-size: 1.25rem; font-weight: 900; font-variant-numeric: tabular-nums; }
.reader-score input {
  appearance: none; grid-column: 1 / -1; width: 100%; height: 36px; margin: 0;
  background: transparent; cursor: pointer;
}
.reader-score input::-webkit-slider-runnable-track {
  height: 11px; border-radius: 99px;
  background: linear-gradient(90deg,var(--score-accent) var(--score-progress),transparent var(--score-progress)),
    repeating-linear-gradient(90deg,var(--score-lane) 0 calc(9.09% - 2px),var(--score-soft) calc(9.09% - 2px) 9.09%);
}
.reader-score input::-moz-range-track {
  height: 11px; border-radius: 99px;
  background: linear-gradient(90deg,var(--score-accent) var(--score-progress),var(--score-lane) var(--score-progress));
}
.reader-score input::-webkit-slider-thumb {
  appearance: none; width: 24px; height: 24px; margin-top: -6.5px;
  border: 1px solid #fff; border-radius: 50%;
  box-shadow: 0 0 0 1px var(--score-ink);
  background: var(--score-ink) url("/reader-score-thumb.webp") center / cover no-repeat;
}
.reader-score input::-moz-range-thumb {
  width: 20px; height: 20px; border: 1px solid #fff; border-radius: 50%;
  box-shadow: 0 0 0 1px var(--score-ink);
  background: var(--score-ink) url("/reader-score-thumb.webp") center / cover no-repeat;
}
.reader-score-scale { display: flex; justify-content: space-between; margin: -.25rem .45rem .7rem 9%; font-size: .72rem; }
.reader-score button {
  border: 1px solid var(--score-ink); border-radius: 8px; padding: .45rem .85rem;
  min-height: 44px; background: #fff; color: var(--score-ink); font: inherit; font-weight: 700;
}
.reader-score button:disabled { opacity: .62; }
.reader-score :is(button,input):focus-visible { outline: 2px solid var(--score-ink); outline-offset: 3px; }
.reader-score [role="status"] { font-size: .85rem; margin: .55rem 0 0; }
.reader-score .score-saved {
  position: relative;
  padding: .65rem .85rem;
  border-radius: 8px;
  background: var(--score-ink);
  color: white;
  font-weight: 750;
}
.reader-score .score-saved::before { content: "✦ "; color: #ffd365; }
.score-burst {
  position: absolute;
  inset: 50% auto auto 50%;
  pointer-events: none;
  z-index: 2;
  animation: score-burst-life .82s linear;
}
.score-burst > span {
  position: absolute;
  width: 8px;
  height: 12px;
  border-radius: 2px;
  background: #f0b846;
  animation: score-confetti .82s ease-out both;
}
.score-burst > span:nth-child(3n + 1) { background: var(--score-accent); }
.score-burst > span:nth-child(3n + 2) { background: #ee668d; border-radius: 50%; }
@keyframes score-burst-life { to { opacity: .99; } }
@keyframes score-confetti {
  from { opacity: 1; transform: scale(.5); }
  40% { opacity: 1; }
  to { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(230deg); }
}
@media (prefers-reduced-motion: reduce) {
  .score-burst, .score-burst > span { animation-duration: .01ms; }
}
