.rush-chip {
  position: fixed;
  left: calc(var(--safe-left) + 8px);
  right: calc(var(--safe-right) + 8px);
  top: 0;
  z-index: 39;
  display: none;
  pointer-events: none;
}

.rush-chip.show,
.rush-chip.out {
  display: block;
}

.rush-chip-pill {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 8px;
  box-sizing: border-box;
  width: max-content;
  max-width: 100%;
  min-height: 44px;
  padding: 5px 14px 5px 8px;
  border: 2px solid var(--gold);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--violet), var(--bg-deep) 90%);
  box-shadow: 0 0 0 1px var(--gold-deep), 0 6px 16px rgba(0, 0, 0, 0.6);
  color: var(--text);
  font: inherit;
  text-align: left;
  pointer-events: auto;
  touch-action: manipulation;
  transform-origin: var(--chip-notch) -14px;
}

.rush-chip.show .rush-chip-pill {
  animation: rush-chip-in 240ms ease-out both;
}

.rush-chip.out .rush-chip-pill {
  pointer-events: none;
  animation: rush-chip-out 320ms cubic-bezier(0.5, 0, 0.8, 0.4) forwards;
}

.rush-chip-pill::before {
  content: "";
  position: absolute;
  left: var(--chip-notch);
  top: -8px;
  width: 12px;
  height: 12px;
  margin-left: -6px;
  border-left: 2px solid var(--gold);
  border-top: 2px solid var(--gold);
  background: var(--violet);
  transform: rotate(45deg);
}

.rush-chip-name {
  font-family: var(--display);
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  text-shadow: 0 1px 0 #000;
  white-space: nowrap;
}

.rush-chip-amount {
  color: var(--gold-light);
  font-family: var(--display);
  font-size: 1.15rem;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.6);
  white-space: nowrap;
}

.rush-chip-extras {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--muted);
  font-family: var(--display);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-shadow: 0 1px 0 #000;
}

.rush-chip-lock {
  display: inline-block;
  position: relative;
  width: 8px;
  height: 6px;
  margin-right: 4px;
  border-radius: 1px;
  background: currentColor;
}

.rush-chip-lock::before {
  content: "";
  position: absolute;
  left: 1px;
  bottom: 100%;
  width: 4px;
  height: 4px;
  border: 1.5px solid currentColor;
  border-bottom: 0;
  border-radius: 3px 3px 0 0;
}

.rush-chip.up .rush-chip-pill {
  transform-origin: var(--chip-notch) calc(100% + 14px);
}

.rush-chip.up .rush-chip-pill::before {
  top: auto;
  bottom: -8px;
  border: 0;
  border-right: 2px solid var(--gold);
  border-bottom: 2px solid var(--gold);
  background: var(--bg-deep);
}

@keyframes rush-chip-in {
  from { transform: scale(0.4); opacity: 0; }
}

@keyframes rush-chip-out {
  to { transform: scale(0.35); opacity: 0.55; }
}

.tile-missions.landed .tile-ring {
  animation: rush-land 450ms ease-out;
}

@media (prefers-reduced-motion: reduce) {
  .rush-chip.show .rush-chip-pill,
  .rush-chip.out .rush-chip-pill,
  .tile-missions.landed .tile-ring {
    animation: none;
  }
}
