/* Approved JRPG level-up presentation shared by preview and live HUD. */
.pokemon-celebration,
.trainer-celebration {
  position: absolute;
  pointer-events: none;
  isolation: isolate;
  color: #ffe4a1;
}
.pokemon-celebration {
  width: 166px;
  height: 60px;
  z-index: 7;
  color: #ceffe8;
}
.pokemon-float {
  position: relative;
  padding: 6px 10px 6px 15px;
  background: linear-gradient(90deg, #081a26c9, #081a2673 65%, #081a2600);
}
.level-headline {
  display: block;
  white-space: nowrap;
  font: 400 16px/1 var(--ui-font-display);
  text-shadow:
    0 2px #06101b,
    1px 0 #06101b,
    -1px 0 #06101b;
}
.level-headline > span {
  display: inline-block;
}
.pokemon-level {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 1px;
  color: #e5fff2;
}
.level-prefix {
  font: 400 18px/1 var(--ui-font-display);
}
.level-number-stack {
  position: relative;
  display: inline-grid;
  font: 400 40px/0.95 var(--ui-font-display);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 2px #0a272a;
}
.level-number-stack > * {
  grid-area: 1 / 1;
  display: block;
  font: inherit;
}
.level-number-before {
  color: #acc8c1;
}
.level-number-stack > strong {
  color: inherit;
}
.level-particles {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}
.level-star {
  display: block;
  position: absolute;
  width: 12px;
  height: 12px;
  background: #fff4cf;
  clip-path: polygon(
    42% 0,
    58% 0,
    58% 25%,
    75% 25%,
    75% 42%,
    100% 42%,
    100% 58%,
    75% 58%,
    75% 75%,
    58% 75%,
    58% 100%,
    42% 100%,
    42% 75%,
    25% 75%,
    25% 58%,
    0 58%,
    0 42%,
    25% 42%,
    25% 25%,
    42% 25%
  );
}
.level-star-cool {
  background: #a9f4e0;
}
.level-mote {
  clip-path: none;
  background: #ebd89d;
}
.pokemon-celebration .level-star {
  background: #c6fff0;
}
.pokemon-celebration .level-star-cool {
  background: #ffe6a4;
}
.level-aura {
  position: absolute;
  z-index: -1;
  opacity: 0;
  pointer-events: none;
}
.pokemon-celebration .level-aura {
  inset: -14px -8px -8px -25px;
  background: radial-gradient(
    ellipse,
    #8aedc652 0%,
    #8aedc625 30%,
    #8aedc600 70%
  );
}
.level-beam {
  position: absolute;
  z-index: 2;
  height: 2px;
  left: -15px;
  right: 0;
  top: 33px;
  background: linear-gradient(
    90deg,
    transparent,
    #d1ffee 20%,
    #fff7d3 50%,
    #d1ffee 80%,
    transparent
  );
  box-shadow:
    0 -2px #a0e7d425,
    0 2px #a0e7d425;
  opacity: 0;
}
.level-glint {
  position: absolute;
  z-index: 4;
  left: 50%;
  top: 27px;
  width: 16px;
  height: 16px;
  opacity: 0;
}
.trainer-celebration {
  left: 50%;
  top: 50%;
  width: 440px;
  height: 240px;
  margin: -120px 0 0 -220px;
  z-index: 6;
  text-align: center;
}
.trainer-celebration::before {
  content: "";
  position: absolute;
  inset: -20px -36px;
  z-index: -2;
  background: radial-gradient(
    ellipse,
    #071322e0 0%,
    #071322b3 42%,
    #07132240 62%,
    #07132200 72%
  );
}
.trainer-content {
  position: relative;
  padding: 38px 0 15px;
}
.trainer-kicker {
  font: 600 11px/1 var(--ui-font-body);
  color: #e2dbbe;
  letter-spacing: 0.23em;
  text-shadow: 0 2px #091420;
}
.trainer-content > .level-headline {
  margin: 10px 0 8px;
  color: #fff0b9;
  font: 400 46px/1 var(--ui-font-display);
  text-shadow:
    0 3px #253132,
    1px 0 #071323,
    -1px 0 #071323;
}
.trainer-level {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  color: #ffdf88;
}
.trainer-level .level-prefix {
  font: 400 19px/1 var(--ui-font-display);
  letter-spacing: 0.06em;
  color: #eee1b8;
}
.trainer-level .level-number-stack {
  font-size: 80px;
  line-height: 0.94;
  text-shadow:
    0 3px #4c4232,
    0 5px #122129;
}
.trainer-level .level-number-before {
  color: #c6b994;
}
.trainer-level .level-glint {
  top: 26px;
  width: 20px;
  height: 20px;
}
.trainer-flourish {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-top: 12px;
  height: 8px;
}
.trainer-flourish i {
  width: 32px;
  height: 1px;
  background: #ffe3a05c;
}
.trainer-flourish .level-star {
  position: static;
  width: 8px;
  height: 8px;
  background: #fff1b9;
}
.trainer-celebration .level-aura {
  inset: 5px 15px 15px;
  background: radial-gradient(ellipse, #c3e1b34a, #97d4c225 35%, #58969c00 70%);
}
.trainer-celebration .level-beam {
  top: 91px;
  left: 7px;
  right: 7px;
  height: 3px;
  background: linear-gradient(
    90deg,
    #ffecae00,
    #fae7a8 24%,
    #fff8de 50%,
    #fae7a8 76%,
    #ffecae00
  );
  box-shadow:
    0 -3px #ffe6aa12,
    0 3px #ffe6aa12;
}

/* Live placement is independent of the map camera and cannot intercept input. */
.level-up-live {
  position: fixed;
  inset: 0;
  z-index: 12;
  pointer-events: none;
  overflow: hidden;
}
.level-up-anchor {
  position: absolute;
  width: 166px;
  height: 60px;
  transform-origin: top left;
}
.level-up-anchor[data-kind="trainer"] {
  width: 440px;
  height: 240px;
}
.level-up-live .trainer-celebration {
  left: 0;
  top: 0;
  margin: 0;
}
.level-up-live .pokemon-float {
  background: linear-gradient(90deg, #081a26eb, #081a26d9 75%, #081a2670);
}
.level-up-live [hidden] {
  display: none !important;
}
.level-up-owner {
  display: none;
  font: 400 14px/1 var(--ui-font-display);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 150px;
  margin-bottom: 2px;
}
.level-up-anchor[data-detached="true"] .level-up-owner {
  display: block;
}
.level-up-anchor[data-inside="true"] .pokemon-float {
  background: linear-gradient(90deg, #081a26f5, #081a26f5 80%, #081a2690);
}
.party .member[data-level-up="true"] {
  border-color: #a7e1c7;
  box-shadow: inset 2px 0 #a7e1c7;
}
.party .member[data-level-up="true"] .member-level {
  color: #c6ffe7;
}
.level-up-announcement {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
