.rate-section {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}
.rate-title {
  font-family: 'Press Start 2P', monospace;
  font-size: .52rem;
  color: var(--muted);
  letter-spacing: .12em;
  margin-bottom: .9rem;
}
.rate-current {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: .85rem;
}
.rate-votes {
  font-size: .8rem;
  color: var(--muted);
  font-family: 'DM Mono', monospace;
}
.rate-label-wrap {
  margin-bottom: .55rem;
  min-height: 1.4rem;
}
.rate-label {
  font-size: .83rem;
  color: var(--muted);
  font-style: italic;
  transition: color .12s;
}
/* Star list — resets the <ul> and lays stars out in a row */
ul.srating {
  list-style: none;
  display: flex;
  gap: .3rem;
  align-items: center;
  flex-wrap: wrap;
}
ul.srating li { margin: 0; padding: 0; }
/* Each star link */
ul.srating a.rate-star-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 6px;
  border: 1px solid var(--border2);
  background: var(--bg3);
  color: var(--muted);
  font-size: 0; /* hide the number — we use CSS content for the star */
  text-decoration: none;
  cursor: pointer;
  transition: all .15s;
  position: relative;
}
ul.srating a.rate-star-btn::after {
  content: '⭐';
  font-size: 1.1rem;
  color: var(--muted);
  transition: color .15s;
}
/* Hover: light up this star and all previous via sibling trick */
ul.srating li:hover a.rate-star-btn::after,
ul.srating li:hover ~ li a.rate-star-btn::after {
  color: var(--muted); /* reset forward stars */
}
ul.srating:hover li a.rate-star-btn::after { color: var(--yellow); }
ul.srating li:hover ~ li a.rate-star-btn::after { color: var(--border2); }
ul.srating a.rate-star-btn:hover {
  border-color: var(--yellow);
  background: rgba(255,215,0,.08);
  transform: translateY(-2px);
  box-shadow: 0 3px 10px rgba(255,215,0,.2);
}
/* Already voted / thank you state */
.rate-already,
#voted {
  display: flex;
  align-items: center;
  gap: .65rem;
  flex-wrap: wrap;
}
.rate-thanks,
span#voted {
  font-size: .85rem;
  font-weight: 600;
  color: var(--green);
}
.star-row {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  line-height: 1;
}
.star {
  font-size: 1rem;
  display: inline-block;
}
.star-full  { color: var(--yellow); }
.star-empty { color: rgba(255,255,255,.15); }
.star-part {
  position: relative;
  display: inline-block;
  color: rgba(255,255,255,.15); /* empty star background */
  width: 1ch; /* match full star width */
}

.star-part::after {
  content: '★';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--yellow);
  width: var(--pct, 50%);
  overflow: hidden;
  display: block;
  height: 100%;
  white-space: nowrap;
  pointer-events: none;
}