.hero-mascot, .campaign-family, .score-mascot {
  -webkit-tap-highlight-color: transparent;
}

.card-score:has(> .score-mascot) {
  --mascot-size: 4.5rem;
  grid-template-columns: max-content minmax(0, 1fr) auto;
  grid-template-areas: "caption copy mascot" "number copy mascot";
  column-gap: .4rem;
}

.card-score:has(> .score-mascot) .card-score-copy {
  padding-inline-start: .4rem;
}

.card-score > .score-mascot {
  grid-area: mascot;
  align-self: center;
}

.ticket-score-region {
  --mascot-size: 4.5rem;
  --mascot-summary-edge: .7rem;
  --mascot-summary-gap: .5rem;
  position: relative;
}

.ticket-score-region:has(> .ticket-score:not([hidden])) {
  margin-top: .66rem;
}

.ticket-score-region > .ticket-score {
  margin-top: 0;
}

.ticket-score-region:has(> .score-mascot) .ticket-score-summary {
  grid-template-columns: auto minmax(0, 1fr) var(--mascot-size) auto;
  min-block-size: calc(var(--mascot-size) + .75rem);
  column-gap: var(--mascot-summary-gap);
  padding-inline: var(--mascot-summary-edge);
}

.ticket-score-region:has(> .score-mascot) .ticket-score-chevron {
  grid-column: 4;
}

.ticket-score-region > .score-mascot {
  position: absolute;
  z-index: 1;
  inset-block-start: calc(1px + .375rem);
  inset-inline-end: calc(1px + var(--mascot-summary-edge) + 1rem + var(--mascot-summary-gap));
}

.score-mascot {
  --mascot-ring: #77943b;
  --mascot-foil: #d3f87b;
  --mascot-glow: #c8b0ff;
  --mascot-spark: #f7bdff;
  --mascot-rotation: -6deg;
  --mascot-move: score-mascot-hop 1.16s ease-in-out;
  position: relative;
  isolation: isolate;
  display: block;
  inline-size: var(--mascot-size, 4.5rem);
  block-size: var(--mascot-size, 4.5rem);
  min-inline-size: 44px;
  min-block-size: 44px;
  border: 0;
  border-radius: .65rem;
  padding: 0;
  background: transparent;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
}

.score-mascot:disabled { cursor: default; }
.score-mascot:focus-visible { outline-offset: 1px; }

.score-mascot[data-mascot-tier="good"] {
  --mascot-ring: #aa84d1;
  --mascot-foil: #e3caff;
  --mascot-glow: #adbcff;
  --mascot-spark: #d8beff;
  --mascot-spark-duration: .55s;
  --mascot-rotation: -3deg;
  --mascot-move: score-mascot-bounce .75s ease-in-out;
}

.score-mascot[data-mascot-tier="conditional"] {
  --mascot-ring: #c39b52;
  --mascot-foil: #ffe5a6;
  --mascot-glow: #edbbdd;
  --mascot-spark: #ffd88c;
  --mascot-spark-duration: .7s;
  --mascot-rotation: 2deg;
  --mascot-move: score-mascot-tilt .9s ease-in-out;
}

.score-mascot[data-mascot-tier="low"] {
  --mascot-ring: #9c8dad;
  --mascot-foil: #ddd4ea;
  --mascot-glow: #b9bee2;
  --mascot-spark: #d9d1e8;
  --mascot-spark-duration: .72s;
  --mascot-rotation: 0deg;
  --mascot-move: score-mascot-slump .92s ease-in-out;
  --mascot-spark-motion: score-mascot-sigh;
}

.score-mascot[data-mascot-placement="dialog"][data-mascot-tier="high"] {
  --mascot-move: score-mascot-hop 1.3s ease-in-out;
  --mascot-hop-height: -1.02rem;
  --mascot-hop-return: -.68rem;
  --mascot-spark-duration: 1.02s;
}

.score-mascot[data-mascot-placement="dialog"][data-mascot-tier="good"] {
  --mascot-move: score-mascot-bounce .88s ease-in-out;
  --mascot-bounce-height: -.58rem;
  --mascot-spark-duration: .66s;
}

.score-mascot[data-mascot-placement="dialog"][data-mascot-tier="conditional"] {
  --mascot-move: score-mascot-tilt 1.12s ease-in-out;
  --mascot-tilt-pose: 11deg;
  --mascot-spark-duration: .66s;
}

.score-mascot[data-mascot-placement="dialog"][data-mascot-tier="low"] {
  --mascot-move: score-mascot-dialog-slump 1.55s ease-in-out;
  --mascot-spark-motion: score-mascot-dialog-sigh;
  --mascot-spark-duration: .86s;
  --mascot-spark-delay: .42s;
}

.score-mascot::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 26% 5% 11%;
  border: 1px solid var(--mascot-ring);
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 31% 19%, #fffdf4 0%, transparent 48%),
    linear-gradient(144deg, #fffdeb 10%, var(--mascot-foil) 49%, var(--mascot-glow) 97%);
  box-shadow: inset 0 0 0 1px #fff9, 0 2px 0 #63763958;
  transform: rotate(-16deg);
}

.score-mascot-art {
  position: absolute;
  inset-inline: 0;
  inset-block-end: 0;
  display: block;
  inline-size: 100%;
  block-size: 100%;
  object-fit: contain;
  transform: rotate(var(--mascot-rotation));
  transform-origin: 50% 80%;
  filter: drop-shadow(0 .13rem .15rem #30234e3e);
  pointer-events: none;
}

.score-mascot-spark {
  position: absolute;
  inline-size: .53rem;
  block-size: .53rem;
  background: linear-gradient(135deg, #fff7fb 10%, var(--mascot-spark) 47%, #6a30bb);
  clip-path: polygon(50% 0, 62% 37%, 100% 50%, 62% 62%, 50% 100%, 37% 62%, 0 50%, 37% 37%);
  transform: rotate(-12deg);
  pointer-events: none;
}

.score-mascot-spark:nth-of-type(1) {
  --spark-x: -.25rem;
  --spark-y: -.32rem;
  inset-block-start: 32%;
  inset-inline-start: -.04rem;
}

.score-mascot-spark:nth-of-type(2) {
  --spark-x: .2rem;
  --spark-y: -.39rem;
  inset-block-start: 14%;
  inset-inline-end: 0;
  inline-size: .64rem;
  block-size: .64rem;
}

.score-mascot-spark:nth-of-type(3) {
  --spark-x: .25rem;
  --spark-y: -.11rem;
  inset-block-end: 18%;
  inset-inline-end: -.12rem;
  inline-size: .42rem;
  block-size: .42rem;
}

.score-mascot[data-mascot-tier="conditional"] .score-mascot-spark:nth-of-type(3),
.score-mascot[data-mascot-tier="low"] .score-mascot-spark:not(:first-of-type) {
  display: none;
}

.score-mascot[data-mascot-tier="low"] .score-mascot-spark:first-of-type {
  inline-size: .67rem;
  block-size: .29rem;
  border-radius: 50%;
  background: #9a89a87d;
  clip-path: none;
  inset-block-start: 52%;
  opacity: .55;
}

.score-mascot[data-mascot-placement="dialog"][data-mascot-tier="low"] .score-mascot-spark:first-of-type {
  inset-inline-start: 48%;
  inset-block-start: 53%;
  opacity: 0;
  background: #c8b7d9;
  box-shadow: inset 0 1px 0 #fff8;
}

@media (prefers-reduced-motion: no-preference) {
  :is(html:not([data-motion="paused"]) .score-mascot.is-celebrating, .score-mascot.is-celebrating[data-mascot-manual]) .score-mascot-art {
    animation: var(--mascot-move);
  }

  :is(html:not([data-motion="paused"]) .score-mascot.is-celebrating, .score-mascot.is-celebrating[data-mascot-manual]) .score-mascot-spark {
    animation: var(--mascot-spark-motion, score-mascot-burst) var(--mascot-spark-duration, .82s) var(--mascot-spark-delay, .15s) ease-out;
  }
}

@keyframes score-mascot-hop {
  0%, 100% { transform: translateY(0) rotate(-6deg) scale(1); }
  13% { transform: translateY(.08rem) rotate(-11deg) scale(1.07, .88); }
  35% { transform: translateY(var(--mascot-hop-height, -.64rem)) rotate(9deg) scale(.95, 1.03); }
  52% { transform: translateY(.08rem) rotate(3deg) scale(1.06, .92); }
  69% { transform: translateY(var(--mascot-hop-return, -.43rem)) rotate(-14deg) scale(.98, 1.04); }
  87% { transform: translateY(0) rotate(-4deg) scale(1.02, .98); }
}

@keyframes score-mascot-bounce {
  0%, 100% { transform: translateY(0) rotate(-3deg) scale(1); }
  24% { transform: translateY(.13rem) rotate(-8deg) scale(1.06, .94); }
  50% { transform: translateY(var(--mascot-bounce-height, -.51rem)) rotate(7deg) scale(.99, 1.03); }
  74% { transform: translateY(.05rem) rotate(-5deg) scale(1.03, .97); }
}

@keyframes score-mascot-tilt {
  0%, 100% { transform: rotate(2deg); }
  34%, 58% { transform: translateY(-.08rem) rotate(var(--mascot-tilt-pose, 14deg)); }
  80% { transform: rotate(-4deg); }
}

@keyframes score-mascot-slump {
  0%, 100% { transform: rotate(0) scale(1); }
  45%, 68% { transform: translateY(.24rem) rotate(-9deg) scale(1.04, .91); }
}

@keyframes score-mascot-dialog-slump {
  0%, 100% { transform: translate(0, 0) rotate(0deg) scale(1); }
  16% { transform: translateY(-.06rem) rotate(2deg) scale(.99, 1.035); }
  42%, 68% { transform: translate(-.12rem, .33rem) rotate(-12deg) scale(1.05, .83); }
  86% { transform: translate(-.05rem, .17rem) rotate(-5deg) scale(1.02, .94); }
}

@keyframes score-mascot-burst {
  0% { transform: rotate(-12deg) scale(.72); opacity: .68; }
  35% { transform: translate(var(--spark-x), var(--spark-y)) rotate(28deg) scale(1.5); opacity: 1; }
  100% { transform: rotate(-12deg) scale(1); opacity: 1; }
}

@keyframes score-mascot-sigh {
  0% { transform: translate(0, 0) scale(.75); opacity: .4; }
  39% { transform: translate(-.32rem, -.12rem) scale(1.28); opacity: .72; }
  100% { transform: translate(-.48rem, -.32rem) scale(1.45); opacity: 0; }
}

@keyframes score-mascot-dialog-sigh {
  0% { transform: translate(0, 0) scale(.4); opacity: 0; }
  36% { transform: translate(-.7rem, .11rem) scale(1); opacity: .94; }
  72% { transform: translate(-1.1rem, -.12rem) scale(1.24); opacity: .49; }
  100% { transform: translate(-1.3rem, -.35rem) scale(1.38); opacity: 0; }
}

@media (max-width: 62rem) {
  .card-score:has(> .score-mascot) { --mascot-size: 4.2rem; }
}

@media (max-width: 27rem) {
  .card-score:has(> .score-mascot),
  .ticket-score-region { --mascot-size: 3.8rem; }
  .ticket-score-region { --mascot-summary-gap: .38rem; }
  .ticket-score-region:has(> .score-mascot) .ticket-score-total { display: grid; row-gap: .12rem; }
}

@media (max-width: 22.5rem) {
  .card-score:has(> .score-mascot),
  .ticket-score-region { --mascot-size: 3.45rem; }
  .ticket-score-region { --mascot-summary-edge: .5rem; }
}
