/* Six stable hit targets. Earned artwork grows inside its target, while the
   counter shares the same44px row and missed criteria carry a quiet slash. */
.result-awards .result-stars {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0;
  margin: 0 0 0 auto;
  padding: 0;
  width: max-content;
  max-width: 100%;
  height: 44px;
  line-height: 1;
  white-space: nowrap;
}
/* Retire the old text-star shadow on every new symbol/counter wrapper. */
.result-awards .result-stars span {
  margin: 0;
  padding: 0;
  text-shadow: none;
}
.result-awards .result-stars .result-star-count {
  display: inline-flex;
  flex: 0 0 44px;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-height: 44px;
  color: #24575b;
  font: 650 24px/1 var(--heading,Fredoka,Arial,sans-serif);
  letter-spacing: -.04em;
  font-variant-numeric: tabular-nums;
}
.result-stars .result-star-count strong { color: #925d17; font: inherit; }
.result-stars .result-star-count > span { color: #24575b; font: inherit; }
.result-stars .result-star-count small { font: 800 10px/1 var(--body,Nunito,Arial,sans-serif); letter-spacing: 0; }
.result-awards .result-stars .result-star-count--recorded {
  display: grid;
  align-content: center;
  justify-items: center;
  row-gap: 2px;
}
.result-stars .result-star-count--recorded strong { font-size: 22px; }
.result-awards .result-stars .result-star-count--bonus { flex-basis: 60px; width: 60px; }
.result-stars .result-star-count .result-star-bonus-count { margin-left: 3px; color: #b3802a; font-size: 12px; }
.result-awards .result-stars .result-star-button {
  display: grid;
  place-items: center;
  position: relative;
  isolation: isolate;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: none;
  box-shadow: none;
  color: #c0a677;
  cursor: help;
  touch-action: manipulation;
  transform: none;
  translate: none;
  scale: none;
  transition: none;
  animation: none;
  -webkit-tap-highlight-color: transparent;
}
.result-stars .result-star-button:is(:hover,:active,[data-star-open]) {
  transform: none;
  translate: none;
  scale: none;
  box-shadow: none;
  background: #d7bc6d1f;
}
.result-stars .result-star-button:focus-visible {
  outline: 2px solid #147c80;
  outline-offset: -3px;
}
.result-stars .result-star-symbol {
  display: block;
  position: relative;
  z-index: 1;
  width: var(--result-star-rest-size, 28px);
  height: var(--result-star-rest-size, 28px);
  line-height: 0;
  transform-origin: 50% 62%;
  pointer-events: none;
}
.result-stars .result-star-button[data-star-earned="true"] .result-star-symbol {
  width: var(--result-star-earned-size, 35px);
  height: var(--result-star-earned-size, 35px);
}
.result-stars .result-star-secret[data-star-earned="true"] .result-star-symbol {
  width: var(--result-star-crystal-size, 38px);
  height: var(--result-star-crystal-size, 38px);
}
.result-stars .result-star-glyph {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  transform-origin: 50% 58%;
  filter: drop-shadow(0 1px 0 #b5853955);
}
.result-star-shape { fill: #d6c7a5; stroke: #a18c61; stroke-width: .9; stroke-linejoin: round; }
.result-star-shine { fill: none; stroke: #fff1c7; stroke-width: 1.5; stroke-linecap: round; opacity: .45; }
.result-star-facet { opacity: 0; }
.result-star-button[data-star-earned="true"] .result-star-shape { fill: var(--result-star-fill,#f8be3e); stroke: #b97c24; }
.result-star-button[data-star-earned="true"] .result-star-shine { stroke: #fff9cb; opacity: .95; }
.result-star-button[data-star-earned="true"] .result-star-facet { opacity: .9; }
.result-star-facet-light { fill: #fff6c2; }
.result-star-facet-amber { fill: #e9a429; }
.result-star-facet-gold { fill: #fbd05a; }
.result-star-button[data-star-earned="true"] .result-star-glyph { filter: drop-shadow(0 1px 0 #b8802b77) drop-shadow(0 0 4px #ffd35c66); }
.result-stars .result-star-secret { border: 0; background: none; }
.result-stars .result-star-secret .result-star-glyph { filter: drop-shadow(0 1px 0 #426d9044); }
.result-stars .result-star-secret[data-star-earned="true"] .result-star-glyph { filter: drop-shadow(0 1px 0 #316baf77) drop-shadow(0 0 5px #67ddff88); }
.result-stars .result-star-cross {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 33px;
  height: 33px;
  overflow: visible;
  transform: translate(-50%,-50%);
  pointer-events: none;
}
.result-star-cross path { fill: none; stroke: #c86e55; stroke-width: 1.75; stroke-linecap: round; filter: drop-shadow(0 1px 0 #fff9e3); }
.result-stars .result-star-aura {
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: 50%;
  background: radial-gradient(circle,#fff6b5c9 0,#ffd56772 34%,#ffe59a00 70%);
  opacity: .28;
  pointer-events: none;
}
.result-stars .result-star-secret .result-star-aura { background: radial-gradient(circle,#f5ffffdd 0,#7bdeff80 34%,#72bdff00 70%); }
.result-stars .result-star-spark {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  width: 2px;
  height: 6px;
  margin-left: -1px;
  border-radius: 999px;
  background: linear-gradient(#fffbe1,#f6c65b);
  opacity: 0;
  transform-origin: 50% 0;
  pointer-events: none;
}
.result-stars .result-star-secret .result-star-spark { background: linear-gradient(#fff,#7fddff); }
/* The six-star row settles blue. During its entrance, each round star
   keeps the gold palette until the larger crystal's light reaches it. */
@property --result-star-blue {
  syntax: "<percentage>";
  inherits: true;
  initial-value: 100%;
}
.result-stars[data-stars-tone="blue"] { position: relative; isolation: isolate; }
.result-stars[data-stars-tone="blue"] .result-star-secret[data-star-earned="true"] .result-star-symbol {
  width: var(--result-star-crystal-size, 42px);
  height: var(--result-star-crystal-size, 42px);
}
.result-stars[data-stars-tone="blue"] .result-star-button:not(.result-star-secret) .result-star-shape { stroke: var(--star-rim,#a0e2ff); }
.result-stars[data-stars-tone="blue"] .result-star-shine { stroke: var(--star-shine,#effdff); }
.result-stars[data-stars-tone="blue"] .result-star-facet-light { fill: var(--star-facet-light,#def9ff); }
.result-stars[data-stars-tone="blue"] .result-star-facet-amber { fill: var(--star-facet-shadow,#2478ca); }
.result-stars[data-stars-tone="blue"] .result-star-facet-gold { fill: var(--star-facet-middle,#70c9fb); }
.result-stars[data-stars-tone="blue"] .result-star-button:not(.result-star-secret) stop:nth-child(1) { stop-color: var(--star-stop-light,#ccf8ff); }
.result-stars[data-stars-tone="blue"] .result-star-button:not(.result-star-secret) stop:nth-child(2) { stop-color: var(--star-stop-middle,#65c8fa); }
.result-stars[data-stars-tone="blue"] .result-star-button:not(.result-star-secret) stop:nth-child(3) { stop-color: var(--star-stop-shadow,#2772d4); }
.result-stars[data-stars-tone="blue"] .result-star-button:not(.result-star-secret) .result-star-glyph {
  filter: drop-shadow(0 1px 0 var(--star-shadow,#153c78)) drop-shadow(0 0 4px var(--star-glow,#71cbff80));
}
.result-stars[data-stars-tone="blue"] .result-star-aura { background: radial-gradient(circle,var(--star-aura-core,#e2fbffd4) 0,var(--star-aura-rim,#6ccaff85) 34%,transparent 70%); }
.result-stars[data-stars-tone="blue"] .result-star-spark { background: linear-gradient(var(--star-spark-tip,#f5feff),var(--star-spark-tail,#61c6ff)); }
@supports (color: color-mix(in srgb, red, blue)) {
  .result-stars[data-stars-tone="blue"] .result-star-button:not(.result-star-secret) {
    --result-star-blue: 100%;
    --star-rim: color-mix(in srgb,#b97c24,#a0e2ff var(--result-star-blue));
    --star-shine: color-mix(in srgb,#fff9cb,#effdff var(--result-star-blue));
    --star-facet-light: color-mix(in srgb,#fff6c2,#def9ff var(--result-star-blue));
    --star-facet-shadow: color-mix(in srgb,#e9a429,#2478ca var(--result-star-blue));
    --star-facet-middle: color-mix(in srgb,#fbd05a,#70c9fb var(--result-star-blue));
    --star-stop-light: color-mix(in srgb,#fff2a4,#ccf8ff var(--result-star-blue));
    --star-stop-middle: color-mix(in srgb,#ffd05b,#65c8fa var(--result-star-blue));
    --star-stop-shadow: color-mix(in srgb,#e49b25,#2772d4 var(--result-star-blue));
    --star-shadow: color-mix(in srgb,#b8802b77,#153c78 var(--result-star-blue));
    --star-glow: color-mix(in srgb,#ffd35c66,#71cbff80 var(--result-star-blue));
    --star-aura-core: color-mix(in srgb,#fff6b5c9,#e2fbffd4 var(--result-star-blue));
    --star-aura-rim: color-mix(in srgb,#ffd56772,#6ccaff85 var(--result-star-blue));
    --star-spark-tip: color-mix(in srgb,#fffbe1,#f5feff var(--result-star-blue));
    --star-spark-tail: color-mix(in srgb,#f6c65b,#61c6ff var(--result-star-blue));
  }
  .result-stars[data-stars-tone="blue"][data-stars-sequence="waiting"] .result-star-button:not(.result-star-secret) {
    --result-star-blue: 0%;
  }
}
.result-star-sweep {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 0;
  width: 84px;
  height: 42px;
  margin: -21px 0 0 -42px;
  border-radius: 50%;
  opacity: 0;
  background: radial-gradient(ellipse,#d1f9ffe6 0,#69dcff8c 26%,#318eff4d 50%,transparent 72%);
  pointer-events: none;
}
.result-stars[data-stars-tone="blue"] .result-star-button:is(:hover,:active,[data-star-open]) { background: #8ad8ff26; }
.result-card .result-awards .result-stars[data-stars-tone="blue"] .result-star-count strong { color: #a9eaff; }
.result-card .result-awards .result-stars[data-stars-tone="blue"][data-stars-sequence="waiting"] .result-star-count strong { color: #ffd67c; }
.result-stars[data-stars-tone="blue"][data-stars-sequence="waiting"] .result-star-symbol { opacity: .22; transform: translateY(3px) rotate(-8deg) scale(.76); }
.result-stars[data-stars-tone="gold"] .result-star-button:not(.result-star-secret) .result-star-aura {
  background: radial-gradient(ellipse 45% 35% at 44% 51%,#fff8bfd9 0%,#ffbd467a 52%,#f5a63e00 100%);
}
.result-stars[data-stars-tone="gold"] .result-star-button:not(.result-star-secret) .result-star-spark {
  background: linear-gradient(#fff8c4,#ffd362 57%,#d78c28);
}
.result-stars[data-stars-tone="gold"][data-stars-sequence="waiting"] [data-star-earned="true"] .result-star-symbol {
  opacity: .3;
  transform: translate(-6px,3px) rotate(-12deg) scale(.78,.67);
}
.result-stars[data-stars-sequence="waiting"] .result-star-aura { opacity: 0; }
.result-star-tooltip {
  position: fixed;
  inset: auto;
  z-index: 2147483647;
  display: block;
  width: max-content;
  max-width: min(230px,calc(100vw - 20px));
  box-sizing: border-box;
  margin: 0;
  padding: 10px 13px;
  border: 1px solid #d8b664;
  border-radius: 13px;
  background: linear-gradient(150deg,#fff6d5,#f5e4af);
  color: #124d53;
  box-shadow: inset 0 0 0 2px #fff8df,0 5px 12px #173f3e33;
  font: 700 13px/1.25 var(--body,Nunito,Arial,sans-serif);
  text-align: left;
  overflow: visible;
  pointer-events: none;
  transform-origin: 50% 100%;
}
.result-star-tooltip[hidden] { display: none; }
.result-star-tooltip > strong { display: block; margin: 0; font: 650 17px/1.15 var(--heading,Fredoka,Arial,sans-serif); }
.result-star-tooltip > p { margin: 4px 0 0; color: #49615a; font: 700 12px/1.25 var(--body,Nunito,Arial,sans-serif); }
.result-star-tooltip > i {
  position: absolute;
  left: var(--result-star-tip-arrow,50%);
  bottom: -5px;
  width: 8px;
  height: 8px;
  border: solid #d8b664;
  border-width: 0 1px 1px 0;
  background: #f5e4af;
  transform: translateX(-50%) rotate(45deg);
}
.result-star-tooltip[data-side="below"] { transform-origin: 50% 0; }
.result-star-tooltip[data-side="below"] > i { top: -5px; bottom: auto; border-width: 1px 0 0 1px; background: #fff6d5; }
/* Supporting rewards and the bookmark stay by the reading note. */
.result-study-sheet .result-topline {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  justify-content: normal;
  row-gap: 5px;
  align-self: center;
  width: min(100%, var(--result-reading-width));
}
.result-study-sheet .result-topline .result-favorite {
  position: static;
  grid-column: 3;
  order: 2;
  margin: 0;
}
.result-study-sheet .result-topline .favorite-button {
  width: max-content;
  min-width: 44px;
  min-height: 44px;
  flex-direction: row;
  align-items: center;
  gap: 5px;
  padding-inline: 6px;
  font-size: 11px;
}
.result-study-sheet .result-topline .favorite-button .icon { width: 22px; height: 22px; }
.result-study-sheet .result-awards {
  align-self: center;
  width: min(100%, var(--result-reading-width));
  margin-block-end: clamp(12px, 2vw, 22px);
  container: result-awards / inline-size;
}
.result-study-sheet .result-awards .result-stars {
  --result-star-space: calc((100cqw - 44px) / 6);
  --result-star-target: clamp(44px, var(--result-star-space), 76px);
  --result-star-rest-size: clamp(28px, calc(var(--result-star-space) - 12px), 49px);
  --result-star-earned-size: clamp(36px, calc(var(--result-star-space) - 5px), 62px);
  --result-star-crystal-size: clamp(40px, calc(var(--result-star-space) - 1px), 68px);
  width: 100%;
  height: auto;
  justify-content: stretch;
  flex-wrap: wrap;
  margin: 0;
}
.result-study-sheet .result-awards .result-stars .result-star-button {
  flex: 1 1 44px;
  height: var(--result-star-target);
}
.result-study-sheet .result-awards .result-stars .result-star-count {
  height: var(--result-star-target);
  font-size: clamp(23px, 5.3cqw, 32px);
}
.result-study-sheet .result-awards .result-stars--tutorial:has(.result-star-count--bonus) {
  --result-star-space: calc((100cqw - 60px) / 6);
}
.result-study-sheet .result-stars .result-star-secret .result-star-symbol {
  width: var(--result-star-crystal-size);
  height: var(--result-star-crystal-size);
}
.result-study-sheet .result-stars .result-star-cross { width: 115%; height: 115%; }
@container result-awards (max-width: 307px) {
  .result-study-sheet .result-awards .result-stars {
    --result-star-space: calc(100cqw / 6);
  }
  .result-study-sheet .result-awards .result-stars .result-star-count { flex-basis: 100%; height: 26px; min-height: 26px; }
}
@container result-awards (width < 264px) {
  .result-study-sheet .result-awards .result-stars .result-star-button { flex-basis: 33.333%; }
}
@media (prefers-reduced-motion: reduce) {
  .result-stars .result-star-glyph, .result-star-tooltip { animation: none !important; transition: none !important; }
}
