.student-quest-chest-result.economy-quest-chest-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  border: 0;
  padding: 18px;
  background: rgb(15 23 42 / 46%);
  overflow-y: auto;
}

.student-quest-chest-result.economy-quest-chest-modal[open] {
  display: grid;
  place-items: center;
}

.student-quest-chest-result.economy-quest-chest-modal::backdrop {
  background: transparent;
}

.economy-quest-chest-modal-card {
  position: relative;
  overflow: hidden;
  display: grid;
  justify-items: center;
  gap: 10px;
  box-sizing: content-box;
  width: min(500px, 100%);
  border: 0;
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgb(255 255 255 / 28%), rgb(255 249 226 / 18%)),
    url("/token-assets/quest-board/reward-panel-parchment.webp") center / 100% 100% no-repeat;
  padding: 24px;
  color: #302410;
  text-align: center;
  animation: economyQuestChestReveal .42s ease-out both;
}

.economy-quest-chest-burst {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.economy-quest-chest-burst span {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #f8c84a;
  box-shadow: 0 0 18px rgb(248 200 74 / 72%);
  animation: economyQuestChestSparkle 1.35s ease-in-out infinite;
}

.economy-quest-chest-burst span:nth-child(1) { left: 18%; top: 22%; animation-delay: 0s; }
.economy-quest-chest-burst span:nth-child(2) { left: 78%; top: 20%; animation-delay: .18s; }
.economy-quest-chest-burst span:nth-child(3) { left: 84%; top: 62%; animation-delay: .34s; }
.economy-quest-chest-burst span:nth-child(4) { left: 24%; top: 72%; animation-delay: .52s; }
.economy-quest-chest-burst span:nth-child(5) { left: 50%; top: 16%; animation-delay: .7s; }

.economy-quest-asset {
  position: relative;
  display: inline-grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
}

.economy-quest-asset img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.economy-quest-asset > span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: transparent;
  font-size: 0;
}

.economy-quest-chest-modal-icon {
  width: 132px;
  height: 132px;
}

.economy-quest-chest-modal-icon--token {
  width: 158px;
  height: 158px;
  margin: -6px 0 -10px;
  filter: drop-shadow(0 18px 24px rgb(162 94 13 / 24%));
}

.economy-quest-chest-modal-copy {
  display: grid;
  justify-items: center;
  gap: 7px;
  width: min(100%, 340px);
}

.economy-quest-chest-modal-copy .economy-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #1d5ec8;
  font-size: 13px;
  font-weight: 900;
}

.economy-quest-chest-modal-card h3 {
  margin: 0;
  color: #14355f;
  font-size: 27px;
  line-height: 1.18;
  font-weight: 1000;
}

.economy-quest-chest-modal-card.is-token h3 {
  font-size: 32px;
}

.economy-quest-chest-modal-card p {
  margin: 0;
  max-width: 330px;
  color: #36526f;
  font-weight: 850;
  line-height: 1.55;
  overflow-wrap: break-word;
  word-break: keep-all;
}

.economy-quest-chest-modal-card.is-token p {
  max-width: 342px;
  color: #17406d;
  font-size: 16px;
  font-weight: 950;
}

.economy-quest-chest-modal-meta {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.economy-quest-chest-modal-meta span {
  border-radius: 999px;
  background: #edf2f7;
  padding: 7px 10px;
  color: #40546c;
  font-size: 12px;
  font-weight: 1000;
}

.economy-quest-chest-odds {
  display: grid;
  gap: 8px;
  box-sizing: content-box;
  width: 100%;
  max-width: 390px;
  border: 1px solid rgb(31 75 119 / 14%);
  border-radius: 8px;
  background: #fffaf0;
  padding: 10px;
  color: #263f5e;
  text-align: left;
}

.economy-quest-chest-odds[hidden] { display: none; }

.economy-quest-chest-odds-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.economy-quest-chest-odds-head strong {
  color: #14355f;
  font-size: 13px;
  font-weight: 1000;
}

.economy-quest-chest-odds-head small {
  color: #9a5a13;
  font-size: 11px;
  font-weight: 1000;
  white-space: nowrap;
}

.economy-quest-chest-odds-list {
  display: grid;
  gap: 5px;
  max-height: 138px;
  overflow-y: auto;
  padding-right: 2px;
}

.economy-quest-chest-odds-list span {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border-radius: 8px;
  background: rgb(255 255 255 / 74%);
  padding: 7px 8px;
  line-height: 1.25;
}

.economy-quest-chest-odds-list b {
  min-width: 0;
  overflow: hidden;
  font-size: 12px;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.economy-quest-chest-odds-list em {
  color: #0f4f9f;
  font-size: 12px;
  font-style: normal;
  font-weight: 1000;
  white-space: nowrap;
}

.economy-quest-chest-modal-card .economy-button {
  border: 1px solid #1d5ec8;
  border-radius: 8px;
  background: #1d5ec8;
  padding: 10px 14px;
  color: #fff;
  box-shadow: 0 2px 8px rgb(23 32 51 / 6%);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

@keyframes economyQuestChestReveal {
  from { opacity: .72; transform: translateY(12px) scale(.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes economyQuestChestSparkle {
  0%, 100% { opacity: .26; transform: scale(.72); }
  45% { opacity: 1; transform: scale(1.32); }
}

@media (prefers-reduced-motion: reduce) {
  .economy-quest-chest-burst span,
  .economy-quest-chest-modal-card { animation: none; }
}
