.schema-ratings {
  --schema-ratings-primary: #3f82f2;
  --schema-ratings-highlight: #f59e0b;
  --schema-ratings-radius: 8px;
  --schema-ratings-font-size: 16px;
  box-sizing: border-box;
  container-name: schema-ratings;
  container-type: inline-size;
  isolation: isolate;
  overflow: hidden;
  max-width: 100%;
  margin: 28px 0;
  padding: 0;
  border: 1px solid #e1e7f0;
  border-radius: calc(var(--schema-ratings-radius) + 8px);
  background: #ffffff;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
  color: #1f2937;
  font-family: inherit;
  font-size: var(--schema-ratings-font-size);
  letter-spacing: 0;
  line-height: 1.4;
  text-align: left;
  text-indent: 0;
}

.schema-ratings *,
.schema-ratings *::before,
.schema-ratings *::after {
  box-sizing: border-box;
  letter-spacing: 0;
  text-indent: 0;
}

.schema-ratings button {
  appearance: none;
  box-shadow: none;
  font: inherit;
  letter-spacing: 0;
  margin: 0;
  min-width: 0;
  text-transform: none;
}

.schema-ratings :where(div, span, svg) {
  margin: 0;
  text-indent: 0;
}

.schema-ratings :where(svg) {
  display: block;
  overflow: visible;
  max-width: none;
}

.schema-ratings__titlebar {
  padding: 20px 22px 15px;
  border-bottom: 1px solid #edf1f7;
  text-align: center;
}

.schema-ratings__title {
  display: block;
  margin: 0;
  color: #172033;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.3;
}

.schema-ratings__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.8fr);
  gap: 22px;
  align-items: stretch;
  padding: 18px 20px;
}

.schema-ratings--no-breakdown .schema-ratings__body {
  grid-template-columns: 1fr;
  justify-items: center;
}

.schema-ratings--no-breakdown .schema-ratings__summary-card {
  width: min(100%, 680px);
  justify-self: center;
}

.schema-ratings__summary-card {
  position: relative;
  display: flex;
  overflow: hidden;
  min-height: 220px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px 22px;
  border-radius: calc(var(--schema-ratings-radius) + 4px);
  background: linear-gradient(135deg, var(--schema-ratings-primary) 0%, #66a6ff 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.26), inset 0 -42px 72px rgba(19, 78, 180, 0.16), 0 18px 32px rgba(63, 130, 242, 0.2);
  color: #ffffff;
  text-align: center;
}

.schema-ratings__summary-card::before,
.schema-ratings__summary-card::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.schema-ratings__summary-card::before {
  inset: -35% auto auto -22%;
  width: 56%;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}

.schema-ratings__summary-card::after {
  right: -18%;
  bottom: -48%;
  width: 72%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
}

.schema-ratings__score,
.schema-ratings__meta,
.schema-ratings__choices {
  position: relative;
  z-index: 1;
}

.schema-ratings__score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #ffffff;
  font-weight: 800;
  white-space: nowrap;
}

.schema-ratings__score-text {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 7px;
  min-width: 0;
}

.schema-ratings__score-ornament {
  width: 34px;
  height: 54px;
  flex: 0 0 auto;
  color: rgba(255, 255, 255, 0.78);
  filter: drop-shadow(0 8px 14px rgba(19, 78, 180, 0.18));
}

.schema-ratings__score-ornament path:not([fill="none"]) {
  fill: currentColor;
}

.schema-ratings__score-ornament--right {
  transform: scaleX(-1);
}

.schema-ratings__score-value {
  display: inline-block;
  color: #ffffff;
  font-size: 3.5rem;
  font-weight: 900;
  line-height: 0.95;
}

.schema-ratings__score-scale {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.3rem;
  font-weight: 800;
}

.schema-ratings__meta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  margin-top: 14px;
  padding: 7px 18px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  color: rgba(255, 255, 255, 0.94);
  font-size: 0.95em;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
}

.schema-ratings__choices {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
}

.schema-ratings button.schema-ratings__choice {
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: rgba(30, 84, 163, 0.78);
  cursor: pointer;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  text-shadow: none;
  transition: color 160ms ease, opacity 160ms ease, transform 160ms ease, background 160ms ease, outline-color 160ms ease;
}

.schema-ratings__star-icon {
  width: 30px;
  height: 30px;
  cursor: pointer;
  fill: transparent;
  pointer-events: none;
  stroke: currentColor;
  stroke-linejoin: round;
  stroke-width: 1.65;
  transform-origin: 50% 50%;
  transition: fill 160ms ease, stroke 160ms ease, transform 160ms ease, filter 160ms ease;
}

.schema-ratings__face-icon {
  --schema-ratings-face-bg: #eceaf3;
  --schema-ratings-face-shadow: #d8d7e3;
  --schema-ratings-face-ink: #575762;
  --schema-ratings-face-mouth: #8d899a;
  --schema-ratings-face-cheek: #f25d50;
  --schema-ratings-face-tear: #7bbce8;
  width: 34px;
  height: 34px;
  cursor: pointer;
  fill: none;
  pointer-events: none;
  stroke: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.85;
  transform-origin: 50% 50%;
  transition: transform 180ms ease, filter 180ms ease;
}

.schema-ratings__face-disc {
  fill: var(--schema-ratings-face-bg);
  stroke: rgba(255, 255, 255, 0.65);
  stroke-width: 0.45;
}

.schema-ratings__face-shadow {
  fill: var(--schema-ratings-face-shadow);
  opacity: 0.72;
}

.schema-ratings__face-highlight {
  fill: rgba(255, 255, 255, 0.38);
  opacity: 0.86;
}

.schema-ratings__face-eye,
.schema-ratings__face-cheek,
.schema-ratings__face-tear,
.schema-ratings__face-spark {
  stroke: none;
}

.schema-ratings__face-eye {
  fill: var(--schema-ratings-face-ink);
}

.schema-ratings__face-cheek {
  fill: var(--schema-ratings-face-cheek);
  opacity: 0.46;
}

.schema-ratings__face-tear {
  fill: var(--schema-ratings-face-tear);
}

.schema-ratings__face-spark {
  fill: #ffffff;
  opacity: 0.86;
}

.schema-ratings__face-mouth,
.schema-ratings__face-brow,
.schema-ratings__face-eye--happy,
.schema-ratings__face-eye--angry,
.schema-ratings__face-mouth-shine {
  fill: none;
  stroke: var(--schema-ratings-face-mouth);
}

.schema-ratings__face-brow,
.schema-ratings__face-eye--angry {
  stroke: var(--schema-ratings-face-ink);
}

.schema-ratings__face-mouth--open {
  fill: var(--schema-ratings-face-mouth);
  stroke: none;
}

.schema-ratings__face-mouth-shine {
  stroke: rgba(255, 255, 255, 0.76);
  stroke-width: 1.15;
}

.schema-ratings__face-icon--rating-1 {
  --schema-ratings-face-bg: #f0e8ef;
  --schema-ratings-face-shadow: #dbcbd8;
  --schema-ratings-face-ink: #383540;
  --schema-ratings-face-mouth: #6a4455;
}

.schema-ratings__face-icon--rating-2 {
  --schema-ratings-face-bg: #eceaf3;
  --schema-ratings-face-shadow: #d7d5e1;
  --schema-ratings-face-ink: #565463;
  --schema-ratings-face-mouth: #8a8696;
}

.schema-ratings__face-icon--rating-3 {
  --schema-ratings-face-bg: #eef1f6;
  --schema-ratings-face-shadow: #d8dde8;
  --schema-ratings-face-ink: #5a6270;
  --schema-ratings-face-mouth: #8c93a0;
}

.schema-ratings__face-icon--rating-4 {
  --schema-ratings-face-bg: #eef1f6;
  --schema-ratings-face-shadow: #d8dde8;
  --schema-ratings-face-ink: #5a6270;
  --schema-ratings-face-mouth: #8c93a0;
  --schema-ratings-face-cheek: #b8c0cf;
}

.schema-ratings__face-icon--rating-4 .schema-ratings__face-disc {
  fill: var(--schema-ratings-face-bg);
}

.schema-ratings__face-icon--rating-5 {
  --schema-ratings-face-bg: #eef1f6;
  --schema-ratings-face-shadow: #d8dde8;
  --schema-ratings-face-ink: #5a6270;
  --schema-ratings-face-mouth: #8c93a0;
  --schema-ratings-face-cheek: #b8c0cf;
}

.schema-ratings button.schema-ratings__choice--filled,
.schema-ratings button.schema-ratings__choice--selected,
.schema-ratings button.schema-ratings__choice--preview {
  color: #ffffff;
}

.schema-ratings button.schema-ratings__choice--filled .schema-ratings__star-icon,
.schema-ratings button.schema-ratings__choice--selected .schema-ratings__star-icon,
.schema-ratings button.schema-ratings__choice--preview .schema-ratings__star-icon {
  fill: currentColor;
  stroke: currentColor;
  filter: drop-shadow(0 7px 12px rgba(19, 78, 180, 0.24));
}

.schema-ratings button.schema-ratings__choice--filled .schema-ratings__face-icon,
.schema-ratings button.schema-ratings__choice--selected .schema-ratings__face-icon,
.schema-ratings button.schema-ratings__choice--preview .schema-ratings__face-icon {
  --schema-ratings-face-bg: #f8da69;
  --schema-ratings-face-shadow: #f0b959;
  --schema-ratings-face-ink: #333238;
  --schema-ratings-face-mouth: #df553f;
  --schema-ratings-face-cheek: #e94f43;
  filter: drop-shadow(0 8px 12px rgba(19, 78, 180, 0.26));
}

.schema-ratings button.schema-ratings__choice--filled .schema-ratings__face-disc,
.schema-ratings button.schema-ratings__choice--selected .schema-ratings__face-disc,
.schema-ratings button.schema-ratings__choice--preview .schema-ratings__face-disc {
  stroke: rgba(255, 255, 255, 0.92);
  stroke-width: 0.6;
}

.schema-ratings--previewing button.schema-ratings__choice--filled:not(.schema-ratings__choice--preview),
.schema-ratings--previewing button.schema-ratings__choice--selected:not(.schema-ratings__choice--preview) {
  color: rgba(30, 84, 163, 0.78);
}

.schema-ratings--previewing button.schema-ratings__choice--filled:not(.schema-ratings__choice--preview) .schema-ratings__star-icon,
.schema-ratings--previewing button.schema-ratings__choice--selected:not(.schema-ratings__choice--preview) .schema-ratings__star-icon {
  fill: transparent;
  stroke: currentColor;
  filter: none;
}

.schema-ratings--previewing button.schema-ratings__choice--filled:not(.schema-ratings__choice--preview) .schema-ratings__face-icon,
.schema-ratings--previewing button.schema-ratings__choice--selected:not(.schema-ratings__choice--preview) .schema-ratings__face-icon {
  --schema-ratings-face-bg: #eef1f6;
  --schema-ratings-face-shadow: #d8dde8;
  --schema-ratings-face-ink: #5a6270;
  --schema-ratings-face-mouth: #8c93a0;
  --schema-ratings-face-cheek: #b8c0cf;
  filter: none;
}

.schema-ratings--previewing button.schema-ratings__choice--filled:not(.schema-ratings__choice--preview) .schema-ratings__face-disc,
.schema-ratings--previewing button.schema-ratings__choice--selected:not(.schema-ratings__choice--preview) .schema-ratings__face-disc {
  stroke: rgba(255, 255, 255, 0.65);
  stroke-width: 0.45;
}

.schema-ratings button.schema-ratings__choice:hover,
.schema-ratings button.schema-ratings__choice:focus-visible,
.schema-ratings button.schema-ratings__choice[aria-checked="true"] {
  background: rgba(255, 255, 255, 0.16);
  color: #fff8dc;
  outline: 2px solid rgba(255, 255, 255, 0.72);
  outline-offset: 2px;
  transform: translateY(-1px) scale(1.04);
}

.schema-ratings button.schema-ratings__choice:hover .schema-ratings__star-icon,
.schema-ratings button.schema-ratings__choice:focus-visible .schema-ratings__star-icon,
.schema-ratings button.schema-ratings__choice:hover .schema-ratings__face-icon,
.schema-ratings button.schema-ratings__choice:focus-visible .schema-ratings__face-icon {
  transform: scale(1.06);
}

.schema-ratings button.schema-ratings__choice:active {
  transform: translateY(1px) scale(0.98);
}

.schema-ratings button.schema-ratings__choice[aria-disabled="true"] {
  cursor: default;
  opacity: 0.7;
}

.schema-ratings button.schema-ratings__choice[aria-disabled="true"] .schema-ratings__star-icon,
.schema-ratings button.schema-ratings__choice[aria-disabled="true"] .schema-ratings__face-icon {
  cursor: default;
}

.schema-ratings--emoji button.schema-ratings__choice {
  color: rgba(30, 84, 163, 0.82);
}

.schema-ratings__breakdown {
  display: grid;
  width: 100%;
  align-self: center;
  gap: 12px;
  margin: 0;
  padding: 6px 8px 6px 0;
}

.schema-ratings__bucket {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) minmax(82px, auto);
  align-items: center;
  gap: 12px;
  color: #374151;
  font-size: 0.95em;
  font-weight: 700;
  line-height: 1.25;
}

.schema-ratings__bucket-label,
.schema-ratings__bucket-count {
  min-width: 0;
  white-space: nowrap;
}

.schema-ratings__bucket-label {
  display: flex;
  align-items: center;
  color: #273245;
}

.schema-ratings__bucket-count {
  color: #4b5563;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.schema-ratings__bucket-stars {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.schema-ratings__bucket-face {
  display: inline-flex;
  width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  color: var(--schema-ratings-highlight);
}

.schema-ratings__mini-star {
  width: 13px;
  height: 13px;
  fill: transparent;
  stroke: currentColor;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.schema-ratings__mini-star--filled {
  color: var(--schema-ratings-highlight);
  fill: currentColor;
  stroke: currentColor;
}

.schema-ratings__mini-star--empty {
  color: #c8d2e0;
}

.schema-ratings__bucket-face .schema-ratings__face-icon {
  width: 23px;
  height: 23px;
  cursor: default;
  pointer-events: none;
  stroke-width: 1.7;
}

.schema-ratings__bucket-face .schema-ratings__face-disc {
  stroke-width: 0.35;
}

.schema-ratings--emoji .schema-ratings__bucket {
  grid-template-columns: 42px minmax(0, 1fr) minmax(82px, auto);
}

.schema-ratings__bar {
  display: block;
  overflow: hidden;
  height: 10px;
  min-width: 0;
  border-radius: 999px;
  background: #eef1f5;
}

.schema-ratings__bar-fill {
  display: block;
  height: 100%;
  min-width: 0;
  border-radius: inherit;
  background: var(--schema-ratings-highlight);
  transition: width 420ms ease;
}

.schema-ratings__notice {
  margin: 0 20px 18px;
  padding: 11px 16px;
  border-radius: calc(var(--schema-ratings-radius) + 2px);
  background: #f3f4f6;
  color: #3f4756;
  font-size: 0.95em;
  font-weight: 800;
  line-height: 1.35;
  text-align: center;
}

@container schema-ratings (max-width: 700px) {
  .schema-ratings__body {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .schema-ratings__summary-card {
    min-height: 190px;
  }

  .schema-ratings__score-value {
    font-size: 3rem;
  }

  .schema-ratings__breakdown {
    padding: 0;
  }

  .schema-ratings__bucket {
    grid-template-columns: 90px minmax(0, 1fr) minmax(76px, auto);
    gap: 9px;
    font-size: 0.9em;
  }

  .schema-ratings--emoji .schema-ratings__bucket {
    grid-template-columns: 38px minmax(0, 1fr) minmax(76px, auto);
  }
}

@media (max-width: 700px) {
  .schema-ratings {
    margin: 22px 0;
  }

  .schema-ratings__titlebar {
    padding: 16px 16px 12px;
  }

  .schema-ratings__body {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .schema-ratings__summary-card {
    min-height: 190px;
  }

  .schema-ratings__score-value {
    font-size: 3rem;
  }

  .schema-ratings__bucket {
    grid-template-columns: 90px minmax(0, 1fr) minmax(76px, auto);
    gap: 9px;
    font-size: 0.9em;
  }

  .schema-ratings--emoji .schema-ratings__bucket {
    grid-template-columns: 38px minmax(0, 1fr) minmax(76px, auto);
  }

  .schema-ratings__notice {
    margin: 0 16px 16px;
  }
}

@media (max-width: 420px) {
  .schema-ratings__choices {
    gap: 5px;
  }

  .schema-ratings button.schema-ratings__choice {
    width: 34px;
    height: 34px;
    font-size: 1.55rem;
  }

  .schema-ratings__star-icon {
    width: 25px;
    height: 25px;
  }

  .schema-ratings__face-icon {
    width: 26px;
    height: 26px;
  }

  .schema-ratings__score-ornament {
    width: 28px;
    height: 46px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .schema-ratings * {
    transition: none !important;
    animation: none !important;
  }
}

@media (forced-colors: active) {
  .schema-ratings {
    border: 1px solid CanvasText;
  }

  .schema-ratings__summary-card,
  .schema-ratings__notice {
    border: 1px solid ButtonText;
  }

  .schema-ratings button.schema-ratings__choice {
    border: 1px solid ButtonText;
  }
}
