.score-popup-shell {
  position: fixed;
  right: 20px;
  top: 86px;
  z-index: 3000;
  width: min(420px, calc(100vw - 32px));
  max-height: calc(100vh - 120px);
  overflow: hidden;
  border: 1px solid rgba(214, 69, 69, 0.22);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 22px 54px rgba(15, 33, 46, 0.22);
  color: #172033;
  font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

.score-popup-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 18px 12px;
  border-bottom: 1px solid #e2e8f0;
}

.score-popup-title {
  margin: 0;
  font-size: 18px;
  font-weight: 900;
}

.score-popup-subtitle {
  margin: 6px 0 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.5;
}

.score-popup-close {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 50%;
  background: #f1f5f9;
  color: #475569;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

.score-popup-close:hover {
  background: #e2e8f0;
}

.score-popup-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 14px 18px;
}

.score-popup-stat {
  padding: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}

.score-popup-stat span {
  display: block;
  color: #64748b;
  font-size: 12px;
}

.score-popup-stat strong {
  display: block;
  margin-top: 4px;
  font-size: 24px;
  line-height: 1;
}

.score-popup-stat.good strong {
  color: #0d7a63;
}

.score-popup-stat.bad strong {
  color: #d64545;
}

.score-popup-body {
  max-height: min(360px, calc(100vh - 300px));
  overflow: auto;
  padding: 0 18px 18px;
}

.score-popup-empty {
  margin: 0;
  padding: 14px;
  border-radius: 8px;
  background: #eefaf6;
  color: #0d7a63;
  font-weight: 800;
}

.score-popup-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.score-popup-item {
  width: 100%;
  padding: 12px;
  border: 1px solid #f1caca;
  border-radius: 8px;
  background: #fff7f7;
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.score-popup-item:hover {
  border-color: #d64545;
  background: #fff1f1;
}

.score-popup-item strong {
  display: block;
  margin-bottom: 5px;
  color: #991b1b;
  font-size: 14px;
}

.score-popup-item span {
  display: block;
  color: #475569;
  font-size: 13px;
  line-height: 1.5;
}

@media (max-width: 640px) {
  .score-popup-shell {
    inset: auto 12px 12px;
    width: auto;
    max-height: min(80vh, 620px);
  }

  .score-popup-stats {
    grid-template-columns: 1fr;
  }
}
