@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable-dynamic-subset.min.css');

html,
body {
  margin: 0;
  background: transparent;
  overflow: hidden;
}

.overlay {
  --accent: #ffb020;
  --accent-soft: rgba(255, 176, 32, 0.18);
  --card: rgba(18, 18, 24, 0.86);
  --text: #fff;
  --muted: rgba(255, 255, 255, 0.7);
  --scale: 1;

  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 2.4em;
  box-sizing: border-box;
  font-family: 'Pretendard Variable', Pretendard, -apple-system, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  font-size: calc(22px * var(--scale));
  color: var(--text);
  pointer-events: none;
  -webkit-font-smoothing: antialiased;
}
.overlay[data-pos='middle'] { align-items: center; }
.overlay[data-pos='bottom'] { align-items: flex-end; }

.alert {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.9em;
  min-width: 15em;
  max-width: 36em;
  padding: 0.8em 1.5em 0.8em 0.8em;
  border-radius: 1.1em;
  background: var(--card);
  box-shadow: 0 0.6em 2em rgba(0, 0, 0, 0.35);
  overflow: hidden;
  animation: enter 460ms cubic-bezier(0.2, 0.9, 0.3, 1.25) both;
}
.alert.leaving { animation: leave 320ms ease-in both; }

.alert.tier-2 { box-shadow: 0 0.6em 2em rgba(0, 0, 0, 0.35), inset 0 0 0 2px var(--accent); }
.alert.tier-3 {
  font-size: 1.2em;
  box-shadow: 0 0 2.4em var(--accent-soft), 0 0.6em 2em rgba(0, 0, 0, 0.4), inset 0 0 0 2px var(--accent);
}
.alert.tier-3::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.18) 50%, transparent 65%);
  transform: translateX(-100%);
  animation: shine 1.6s 500ms ease-in-out 2;
}

.media {
  flex: none;
  display: grid;
  place-items: center;
  width: 3.4em;
  height: 3.4em;
  border-radius: 0.8em;
  background: var(--accent-soft);
  color: var(--accent);
}
.media img { width: 100%; height: 100%; object-fit: contain; }
.media svg { width: 58%; height: 58%; }

.body { min-width: 0; }

.name {
  display: flex;
  align-items: center;
  gap: 0.35em;
  font-size: 1.15em;
  font-weight: 700;
  line-height: 1.3;
}
.nick { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.arrow { flex: none; display: inline-flex; color: var(--muted); }
.arrow svg { width: 0.9em; height: 0.9em; }

.amount {
  display: flex;
  align-items: baseline;
  gap: 0.3em;
  margin-top: 0.1em;
  line-height: 1.15;
}
.label { font-weight: 600; color: var(--muted); }
.num {
  font-size: 1.9em;
  font-weight: 800;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.unit { font-weight: 600; color: var(--muted); }

.badges { display: flex; gap: 0.35em; margin-top: 0.4em; }
.badge {
  padding: 0.15em 0.55em;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.72em;
  font-weight: 700;
}

@keyframes enter {
  from { opacity: 0; transform: translateY(0.8em) scale(0.92); }
  to { opacity: 1; transform: none; }
}
@keyframes leave {
  to { opacity: 0; transform: translateY(-0.5em) scale(0.97); }
}
@keyframes shine {
  to { transform: translateX(100%); }
}

@media (prefers-reduced-motion: reduce) {
  .alert, .alert.leaving, .alert.tier-3::after { animation-duration: 1ms; }
}
