.unlock-dialog {
  --unlock-color: #804819;
  --unlock-border: #d4a45c;
  --unlock-wash: #ffe6ac;
  width: min(420px, calc(100vw - 28px));
  max-height: calc(100dvh - 24px);
  padding: 20px 25px;
  border: 1px solid var(--unlock-border);
  border-radius: 22px;
  background: radial-gradient(ellipse at 50% 16%, var(--unlock-wash), #fffdf4 54%);
  box-shadow: 0 20px 65px #5b361655, inset 0 0 0 4px #ffffff7a;
  text-align: center;
}
.unlock-dialog[data-unlock-region="territory"] {
  --unlock-color: #3d612f; --unlock-border: #8ca66a; --unlock-wash: #e4eeb6;
}
.unlock-dialog[data-unlock-region="energy"] {
  --unlock-color: #295c6c; --unlock-border: #82aeb8; --unlock-wash: #d7efee;
}
.unlock-dialog[data-unlock-region="mutagen"] {
  --unlock-color: #724779; --unlock-border: #bb96bd; --unlock-wash: #f1deef;
}
.unlock-dialog::backdrop { background: #3424155c; }
.unlock-dialog[open]:not(.unlock-static)::backdrop { animation: unlock-shade 460ms ease-out both; }
@keyframes unlock-shade {
  from { background-color: transparent; }
  to { background-color: #3424155c; }
}
.unlock-egg {
  --egg-duration: 860ms;
  --egg-finish: radial-gradient(ellipse at 33% 25%, #fffdf1 7%, #fff0c3 45%, #edbf7d 84%);
  position: absolute; z-index: 3; left: 50%; bottom: 9px; width: 44px; height: 56px;
  transform: translateX(-50%); pointer-events: none;
}
.unlock-egg::before {
  position: absolute; inset: auto -5px -3px; height: 8px;
  border-radius: 50%; background: #7b4a3150;
  content: "";
  animation: unlock-egg-shadow var(--egg-duration) both;
}
.unlock-egg-sway {
  position: absolute; inset: 0; transform-origin: 50% 92%;
  animation: unlock-egg-rock var(--egg-duration) both;
}
.unlock-egg-whole, .unlock-egg-piece {
  position: absolute; inset: 0;
  border: 2px solid #a57745; border-radius: 51% 51% 48% 48% / 61% 61% 39% 39%;
  background: var(--egg-finish);
  box-shadow: inset -3px -4px #bd8a5029, inset 2px 1px #fffefa99;
}
.unlock-egg-crack {
  position: absolute; inset: 0;
  background: #975c3b;
}
.unlock-egg-crack-left {
  clip-path: polygon(3% 55%, 19% 46%, 31% 56%, 43% 47%, 58% 58%, 56% 63%, 43% 52%,
    31% 61%, 18% 51%, 3% 60%);
  animation: unlock-crack-left var(--egg-duration) steps(1, end) both;
}
.unlock-egg-crack-right {
  clip-path: polygon(55% 58%, 68% 47%, 80% 58%, 96% 49%, 98% 54%, 80% 63%, 68% 52%, 57% 64%);
  animation: unlock-crack-right var(--egg-duration) steps(1, end) both;
}
.unlock-egg-piece { visibility: hidden; }
.unlock-egg-piece-top {
  clip-path: polygon(0 0, 100% 0, 100% 50%, 80% 60%, 68% 50%, 57% 61%, 43% 50%, 31% 59%, 19% 49%, 0 59%);
}
.unlock-egg-piece-base {
  clip-path: polygon(0 59%, 19% 49%, 31% 59%, 43% 50%, 57% 61%, 68% 50%, 80% 60%, 100% 50%, 100% 100%, 0 100%);
}
.unlock-egg.egg-burst .unlock-egg-sway,
.unlock-egg.egg-burst::before { visibility: hidden; }
.unlock-egg.egg-burst .unlock-egg-piece { visibility: visible; }
.unlock-egg.egg-burst .unlock-egg-piece-top { animation: unlock-egg-top .38s ease-out both; }
.unlock-egg.egg-burst .unlock-egg-piece-base { animation: unlock-egg-base .38s ease-out both; }
@keyframes unlock-egg-rock {
  0% { opacity: 0; transform: translateY(4px) scale(.86); }
  14% { opacity: 1; transform: none; }
  31% { transform: rotate(-15deg); }
  39% { transform: rotate(-10deg); }
  49% { transform: none; }
  68% { transform: rotate(14deg); }
  76% { transform: rotate(9deg); }
  85% { transform: none; }
  100% { transform: scale(1.04, .96); }
}
@keyframes unlock-egg-shadow {
  from { opacity: 0; }
  17%, 100% { opacity: 1; }
}
@keyframes unlock-crack-left { 0% { opacity: 0; } 30%, 100% { opacity: 1; } }
@keyframes unlock-crack-right { 0% { opacity: 0; } 67%, 100% { opacity: 1; } }
@keyframes unlock-egg-top {
  from { opacity: 1; transform: none; }
  32% { opacity: .94; transform: translate(-15px, -16px) rotate(-23deg); }
  to { opacity: 0; transform: translate(-24px, -3px) rotate(-42deg) scale(.87); }
}
@keyframes unlock-egg-base {
  from { opacity: 1; transform: none; }
  32% { opacity: .94; transform: translate(13px, -4px) rotate(17deg); }
  to { opacity: 0; transform: translate(22px, 8px) rotate(34deg) scale(.9); }
}
.unlock-portrait {
  position: relative;
  isolation: isolate;
  display: grid; place-items: center;
  width: 100%; height: 128px;
  margin: 0 auto 9px;
}
.unlock-portrait::before,
.unlock-portrait::after {
  position: absolute; left: 50%; top: 50%; z-index: -1;
  width: 150px; height: 119px;
  content: "";
  clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
  transform: translate(-50%, -50%);
}
.unlock-portrait::before { background: var(--unlock-border); opacity: .66; }
.unlock-portrait::after {
  background: linear-gradient(160deg, #fffdf5, var(--unlock-wash) 76%);
  transform: translate(-50%, -50%) scale(.955);
}
.unlock-portrait .art-shell,
.unlock-flight .art-shell {
  position: relative; inset: auto; flex: none;
  width: 100px; height: 64px; opacity: 1;
  transform: scale(1.48);
}
.unlock-category {
  margin: 0 0 3px; color: var(--unlock-color); font-size: 12px; font-weight: 800;
}
.unlock-dialog h2 { margin: 0 0 11px; color: #503421; font-size: 26px; line-height: 1.25; }
.unlock-description { max-width: 29em; margin: 0 auto 15px; font-size: 14px; line-height: 1.65; }
.unlock-facts {
  display: grid; gap: 4px;
  margin: 0 auto 15px; padding: 8px 12px;
  border-left: 2px solid var(--unlock-border); border-radius: 6px;
  background: #efe3c55c; color: #694b31;
  font-size: 12px; line-height: 1.45; text-align: left;
}
.unlock-facts p { margin: 0; }
.unlock-companions { display: grid; gap: 12px; margin: 14px 0 19px; text-align: left; }
.unlock-companion {
  display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 9px; align-items: center;
  padding-top: 12px; border-top: 1px solid var(--unlock-border);
}
.unlock-companion-art { display: grid; place-items: center; width: 70px; height: 54px; }
.unlock-companion-art .art-shell {
  position: relative; inset: auto; width: 100px; height: 64px; opacity: 1; transform: scale(.68);
}
.unlock-companion h3 { margin: 0 0 4px; color: var(--unlock-color); font-size: 15px; }
.unlock-companion p { margin: 0; font-size: 13px; line-height: 1.6; }
.unlock-companion small { display: block; margin-top: 4px; color: #775a3b; font-size: 11px; line-height: 1.5; }
.unlock-confirm {
  min-width: 110px; min-height: 44px; padding-inline: 24px;
  border-color: var(--unlock-border); background: var(--unlock-wash); color: var(--unlock-color);
  box-shadow: 0 2px 0 color-mix(in srgb, var(--unlock-border) 40%, transparent);
  font-weight: 850;
}
.unlock-flight {
  position: fixed; z-index: 38; display: grid; place-items: center;
  pointer-events: none;
}
.unlock-arriving .art-shell { opacity: 0 !important; }
.effect-unlock .fx-ring {
  border: 2px solid #ffdb81; box-shadow: 0 0 9px #db9c456e, inset 0 0 5px #ffefd2;
  animation-duration: .66s;
}
@media (max-width: 420px) {
  .unlock-dialog { padding-inline: 17px; }
}
@media (max-width: 660px) {
  .unlock-egg { width: 34px; height: 43px; bottom: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  .unlock-egg, .unlock-dialog[open]::backdrop { animation: none !important; }
  .unlock-egg-sway { animation: none; }
}
