/* ── Missions (three active goals, top of the sidebar) ───────────────────────── */
#missions-block .sb-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
#missions-gauge { font-size: 12px; line-height: 1; letter-spacing: 0; color: var(--text); font-weight: 700; white-space: nowrap; }
#missions-gauge:empty { display: none; }

#missions-list { display: flex; flex-direction: column; }

/* icon | label        |
        | bar          |
        | count | skip |   — the label wraps on as many lines as it needs. */
.mission {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 8px;
  row-gap: 4px;
  padding: 6px 0;
  border-bottom: 1px solid #1e1e40;
}
.mission:first-child { padding-top: 0; }
.mission:last-child { padding-bottom: 0; border-bottom: none; }
.ms-icon { font-size: 16px; text-align: center; align-self: start; line-height: 1.25; }
.ms-label { grid-column: 2 / -1; font-size: 13px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.ms-bar {
  grid-column: 2 / -1;
  height: 7px;
  border-radius: 4px;
  background: #0f0f2a;
  border: 1px solid var(--border);
  overflow: hidden;
}
.ms-fill {
  display: block;
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  transition: width .35s ease;
}
.ms-count { grid-column: 2; font-size: 12px; color: var(--muted); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ms-skip {
  grid-column: 3;
  min-height: 22px;
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #0c0c22;
  color: var(--gold);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.ms-skip:hover:not(.broke) { border-color: var(--accent); background: #14143a; }
/* Out of reach: still readable (it is the price to save up for), plainly not a call to action. */
.ms-skip.broke { color: var(--muted); background: transparent; border-style: dashed; cursor: not-allowed; }

/* A finished track: one quiet line. */
.mission.done .ms-label { color: var(--muted); font-weight: 500; }

/* Just completed: the card says so for a few seconds, then the next mission takes its place. */
.mission.won .ms-label { color: var(--green); }
.mission.won .ms-fill { background: var(--green); }
.ms-won { grid-column: 2 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; min-height: 22px; font-size: 12px; line-height: 1.3; }
.ms-reward { color: var(--gold); font-size: 13px; font-weight: 800; white-space: nowrap; }
.ms-resident { color: var(--text); font-weight: 600; overflow-wrap: anywhere; }

.mission.just-done { animation: ms-pop .7s ease; }
@keyframes ms-pop {
  0% { transform: scale(1); }
  35% { transform: scale(1.04); background: rgba(16, 185, 129, .14); border-radius: 8px; }
  100% { transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .mission.just-done { animation: none; }
  .ms-fill { transition: none; }
}

/* Phones: a finger-sized skip button. */
@media (max-width: 720px) {
  .ms-skip { min-height: 36px; padding: 6px 12px; }
  .ms-won { min-height: 36px; }
}
